Class: Google::Apis::RunV1alpha1::EnvVar

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

Overview

EnvVar represents an environment variable present in a Container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ EnvVar

Returns a new instance of EnvVar



1086
1087
1088
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1086

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

Instance Attribute Details

#nameString

Name of the environment variable. Must be a C_IDENTIFIER. Corresponds to the JSON property name

Returns:

  • (String)


1071
1072
1073
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1071

def name
  @name
end

#valueString

Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". +optional Corresponds to the JSON property value

Returns:

  • (String)


1084
1085
1086
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1084

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1091
1092
1093
1094
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1091

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