Class: Google::Apis::RuntimeconfigV1beta1::Cardinality

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/runtimeconfig_v1beta1/classes.rb,
lib/google/apis/runtimeconfig_v1beta1/representations.rb,
lib/google/apis/runtimeconfig_v1beta1/representations.rb

Overview

A Cardinality condition for the Waiter resource. A cardinality condition is met when the number of variables under a specified path prefix reaches a predefined number. For example, if you set a Cardinality condition where the path is set to /foo and the number of paths is set to 2, the following variables would meet the condition in a RuntimeConfig resource: + /foo/ variable1 = "value1" + /foo/variable2 = "value2" + /bar/variable3 = " value3" It would not satisfy the same condition with the number set to 3, however, because there is only 2 paths that start with /foo. Cardinality conditions are recursive; all subtrees under the specific path prefix are counted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Cardinality

Returns a new instance of Cardinality.



150
151
152
# File 'lib/google/apis/runtimeconfig_v1beta1/classes.rb', line 150

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#numberFixnum

The number variables under the path that must exist to meet this condition. Defaults to 1 if not specified. Corresponds to the JSON property number

Returns:

  • (Fixnum)


143
144
145
# File 'lib/google/apis/runtimeconfig_v1beta1/classes.rb', line 143

def number
  @number
end

#pathString

The root of the variable subtree to monitor. For example, /foo. Corresponds to the JSON property path

Returns:

  • (String)


148
149
150
# File 'lib/google/apis/runtimeconfig_v1beta1/classes.rb', line 148

def path
  @path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



155
156
157
158
# File 'lib/google/apis/runtimeconfig_v1beta1/classes.rb', line 155

def update!(**args)
  @number = args[:number] if args.key?(:number)
  @path = args[:path] if args.key?(:path)
end