Class: Google::Apis::RunV1::EnvVar

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

Overview

EnvVar represents an environment variable present in a Container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EnvVar

Returns a new instance of EnvVar.



1000
1001
1002
# File 'lib/google/apis/run_v1/classes.rb', line 1000

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

Instance Attribute Details

#nameString

Required. Name of the environment variable. Corresponds to the JSON property name

Returns:

  • (String)


987
988
989
# File 'lib/google/apis/run_v1/classes.rb', line 987

def name
  @name
end

#valueString

Value of the environment variable. Defaults to "". Variable references are not supported in Cloud Run. Corresponds to the JSON property value

Returns:

  • (String)


993
994
995
# File 'lib/google/apis/run_v1/classes.rb', line 993

def value
  @value
end

#value_fromGoogle::Apis::RunV1::EnvVarSource

EnvVarSource represents a source for the value of an EnvVar. Corresponds to the JSON property valueFrom



998
999
1000
# File 'lib/google/apis/run_v1/classes.rb', line 998

def value_from
  @value_from
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1005
1006
1007
1008
1009
# File 'lib/google/apis/run_v1/classes.rb', line 1005

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