Class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1CostProjection

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

Overview

Contains metadata about how much money a recommendation can save or incur.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecommenderV1beta1CostProjection

Returns a new instance of GoogleCloudRecommenderV1beta1CostProjection.



121
122
123
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 121

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

Instance Attribute Details

#costGoogle::Apis::RecommenderV1beta1::GoogleTypeMoney

Represents an amount of money with its currency type. Corresponds to the JSON property cost



104
105
106
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 104

def cost
  @cost
end

#cost_in_local_currencyGoogle::Apis::RecommenderV1beta1::GoogleTypeMoney

Represents an amount of money with its currency type. Corresponds to the JSON property costInLocalCurrency



109
110
111
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 109

def cost_in_local_currency
  @cost_in_local_currency
end

#durationString

Duration for which this cost applies. Corresponds to the JSON property duration

Returns:

  • (String)


114
115
116
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 114

def duration
  @duration
end

#pricing_typeString

How the cost is calculated. Corresponds to the JSON property pricingType

Returns:

  • (String)


119
120
121
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 119

def pricing_type
  @pricing_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



126
127
128
129
130
131
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 126

def update!(**args)
  @cost = args[:cost] if args.key?(:cost)
  @cost_in_local_currency = args[:cost_in_local_currency] if args.key?(:cost_in_local_currency)
  @duration = args[:duration] if args.key?(:duration)
  @pricing_type = args[:pricing_type] if args.key?(:pricing_type)
end