Class: Google::Apis::RuntimeconfigV1beta1::Variable
- Inherits:
-
Object
- Object
- Google::Apis::RuntimeconfigV1beta1::Variable
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/runtimeconfig_v1beta1/classes.rb,
generated/google/apis/runtimeconfig_v1beta1/representations.rb,
generated/google/apis/runtimeconfig_v1beta1/representations.rb
Overview
Describes a single variable within a RuntimeConfig resource.
The name denotes the hierarchical variable name. For example,
ports/serving_port
is a valid variable name. The variable value is an
opaque string and only leaf variables can have values (that is, variables
that do not have any child variables).
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the variable resource, in the format: projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME] The
[PROJECT_ID]
must be a valid project ID,[CONFIG_NAME]
must be a valid RuntimeConfig resource and[VARIABLE_NAME]
follows Unix file system file path naming. -
#state ⇒ String
Output only.
-
#text ⇒ String
The string value of the variable.
-
#update_time ⇒ String
Output only.
-
#value ⇒ String
The binary value of the variable.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Variable
constructor
A new instance of Variable.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Variable
Returns a new instance of Variable
664 665 666 |
# File 'generated/google/apis/runtimeconfig_v1beta1/classes.rb', line 664 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
The name of the variable resource, in the format:
projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]
The [PROJECT_ID]
must be a valid project ID, [CONFIG_NAME]
must be a
valid RuntimeConfig resource and [VARIABLE_NAME]
follows Unix file system
file path naming.
The [VARIABLE_NAME]
can contain ASCII letters, numbers, slashes and
dashes. Slashes are used as path element separators and are not part of the
[VARIABLE_NAME]
itself, so [VARIABLE_NAME]
must contain at least one
non-slash character. Multiple slashes are coalesced into single slash
character. Each path segment should match
0-9A-Za-z? regular expression.
The length of a [VARIABLE_NAME]
must be less than 256 characters.
Once you create a variable, you cannot change the variable name.
Corresponds to the JSON property name
632 633 634 |
# File 'generated/google/apis/runtimeconfig_v1beta1/classes.rb', line 632 def name @name end |
#state ⇒ String
Output only. The current state of the variable. The variable state
indicates the outcome of the variables().watch
call and is visible
through the get
and list
calls.
Corresponds to the JSON property state
639 640 641 |
# File 'generated/google/apis/runtimeconfig_v1beta1/classes.rb', line 639 def state @state end |
#text ⇒ String
The string value of the variable. The length of the value must be less
than 4096 bytes. Empty values are also accepted. For example,
text: "my text value"
. The string must be valid UTF-8.
Corresponds to the JSON property text
646 647 648 |
# File 'generated/google/apis/runtimeconfig_v1beta1/classes.rb', line 646 def text @text end |
#update_time ⇒ String
Output only. The time of the last variable update.
Timestamp will be UTC timestamp.
Corresponds to the JSON property updateTime
652 653 654 |
# File 'generated/google/apis/runtimeconfig_v1beta1/classes.rb', line 652 def update_time @update_time end |
#value ⇒ String
The binary value of the variable. The length of the value must be less
than 4096 bytes. Empty values are also accepted. The value must be
base64 encoded, and must comply with IETF RFC4648
(https://www.ietf.org/rfc/rfc4648.txt). Only one of value
or text
can be set.
Corresponds to the JSON property value
NOTE: Values are automatically base64 encoded/decoded in the client library.
662 663 664 |
# File 'generated/google/apis/runtimeconfig_v1beta1/classes.rb', line 662 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
669 670 671 672 673 674 675 |
# File 'generated/google/apis/runtimeconfig_v1beta1/classes.rb', line 669 def update!(**args) @name = args[:name] if args.key?(:name) @state = args[:state] if args.key?(:state) @text = args[:text] if args.key?(:text) @update_time = args[:update_time] if args.key?(:update_time) @value = args[:value] if args.key?(:value) end |