Class: Google::Apis::CloudbillingV1beta::GoogleCloudBillingPricesV1betaUnitInfo

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

Overview

Encapsulates the unit information for a Rate

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudBillingPricesV1betaUnitInfo

Returns a new instance of GoogleCloudBillingPricesV1betaUnitInfo.



1938
1939
1940
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1938

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

Instance Attribute Details

#unitString

Shorthand for the unit. Example: GiBy.mo. Corresponds to the JSON property unit

Returns:

  • (String)


1922
1923
1924
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1922

def unit
  @unit
end

#unit_descriptionString

Human-readable description of the unit. Example: gibibyte month. Corresponds to the JSON property unitDescription

Returns:

  • (String)


1927
1928
1929
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1927

def unit_description
  @unit_description
end

#unit_quantityGoogle::Apis::CloudbillingV1beta::Decimal

A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/ api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python. org/3/library/decimal.html Corresponds to the JSON property unitQuantity



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

def unit_quantity
  @unit_quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1943
1944
1945
1946
1947
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1943

def update!(**args)
  @unit = args[:unit] if args.key?(:unit)
  @unit_description = args[:unit_description] if args.key?(:unit_description)
  @unit_quantity = args[:unit_quantity] if args.key?(:unit_quantity)
end