Class: Google::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaUnitInfo

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) ⇒ GoogleCloudBillingBillingaccountpricesV1betaUnitInfo

Returns a new instance of GoogleCloudBillingBillingaccountpricesV1betaUnitInfo.



1177
1178
1179
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1177

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)


1161
1162
1163
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1161

def unit
  @unit
end

#unit_descriptionString

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

Returns:

  • (String)


1166
1167
1168
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1166

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



1175
1176
1177
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1175

def unit_quantity
  @unit_quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1182
1183
1184
1185
1186
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1182

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