Class: Google::Apis::CloudchannelV1::GoogleCloudChannelV1ParameterDefinition

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

Overview

Parameter's definition. Specifies what parameter is required to use the current Offer to purchase.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudChannelV1ParameterDefinition

Returns a new instance of GoogleCloudChannelV1ParameterDefinition.



1960
1961
1962
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1960

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

Instance Attribute Details

#allowed_valuesArray<Google::Apis::CloudchannelV1::GoogleCloudChannelV1Value>

If not empty, parameter values must be drawn from this list. For example, [us- west1, us-west2, ...] Applicable to STRING parameter type. Corresponds to the JSON property allowedValues



1931
1932
1933
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1931

def allowed_values
  @allowed_values
end

#max_valueGoogle::Apis::CloudchannelV1::GoogleCloudChannelV1Value

Data type and value of a parameter. Corresponds to the JSON property maxValue



1936
1937
1938
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1936

def max_value
  @max_value
end

#min_valueGoogle::Apis::CloudchannelV1::GoogleCloudChannelV1Value

Data type and value of a parameter. Corresponds to the JSON property minValue



1941
1942
1943
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1941

def min_value
  @min_value
end

#nameString

Name of the parameter. Corresponds to the JSON property name

Returns:

  • (String)


1946
1947
1948
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1946

def name
  @name
end

#optionalBoolean Also known as: optional?

If set to true, parameter is optional to purchase this Offer. Corresponds to the JSON property optional

Returns:

  • (Boolean)


1951
1952
1953
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1951

def optional
  @optional
end

#parameter_typeString

Data type of the parameter. Minimal value, Maximum value and allowed values will use specified data type here. Corresponds to the JSON property parameterType

Returns:

  • (String)


1958
1959
1960
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1958

def parameter_type
  @parameter_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1965
1966
1967
1968
1969
1970
1971
1972
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1965

def update!(**args)
  @allowed_values = args[:allowed_values] if args.key?(:allowed_values)
  @max_value = args[:max_value] if args.key?(:max_value)
  @min_value = args[:min_value] if args.key?(:min_value)
  @name = args[:name] if args.key?(:name)
  @optional = args[:optional] if args.key?(:optional)
  @parameter_type = args[:parameter_type] if args.key?(:parameter_type)
end