Class: Google::Apis::RunV2::GoogleCloudRunV2EnvVar

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

Overview

EnvVar represents an environment variable present in a Container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2EnvVar

Returns a new instance of GoogleCloudRunV2EnvVar.



474
475
476
# File 'lib/google/apis/run_v2/classes.rb', line 474

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

Instance Attribute Details

#nameString

Required. Name of the environment variable. Must not exceed 32768 characters. Corresponds to the JSON property name

Returns:

  • (String)


461
462
463
# File 'lib/google/apis/run_v2/classes.rb', line 461

def name
  @name
end

#valueString

Literal value of the environment variable. Defaults to "", and the maximum length is 32768 bytes. Variable references are not supported in Cloud Run. Corresponds to the JSON property value

Returns:

  • (String)


467
468
469
# File 'lib/google/apis/run_v2/classes.rb', line 467

def value
  @value
end

#value_sourceGoogle::Apis::RunV2::GoogleCloudRunV2EnvVarSource

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



472
473
474
# File 'lib/google/apis/run_v2/classes.rb', line 472

def value_source
  @value_source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



479
480
481
482
483
# File 'lib/google/apis/run_v2/classes.rb', line 479

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