Class: Google::Apis::MlV1::GoogleCloudMlV1EnvVar

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

Overview

Represents an environment variable to be made available in a container. This message is a subset of the Kubernetes EnvVar v1 core specification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudMlV1EnvVar

Returns a new instance of GoogleCloudMlV1EnvVar.



1040
1041
1042
# File 'lib/google/apis/ml_v1/classes.rb', line 1040

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

Instance Attribute Details

#nameString

Name of the environment variable. Must be a valid C identifier and must not begin with the prefix AIP_. Corresponds to the JSON property name

Returns:

  • (String)


1024
1025
1026
# File 'lib/google/apis/ml_v1/classes.rb', line 1024

def name
  @name
end

#valueString

Value of the environment variable. Defaults to an empty string. In this field, you can reference environment variables set by AI Platform Prediction and environment variables set earlier in the same env field as where this message occurs. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $(VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with $$; for example: $$(VARIABLE_NAME) Corresponds to the JSON property value

Returns:

  • (String)


1038
1039
1040
# File 'lib/google/apis/ml_v1/classes.rb', line 1038

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1045
1046
1047
1048
# File 'lib/google/apis/ml_v1/classes.rb', line 1045

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