Class: Google::Apis::CloudbillingV1beta::CostScenario

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 all the information needed to perform a cost estimate. It includes a specification of the Google Cloud usage whose costs are estimated, and configuration options.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CostScenario

Returns a new instance of CostScenario.



299
300
301
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 299

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

Instance Attribute Details

#commitmentsArray<Google::Apis::CloudbillingV1beta::Commitment>

New commitments to estimate the costs for. The cost of the commitments will be included in the estimate result and discounts the commitment entitles will be included in the workload cost estimates. A maximum of 100 workloads can be provided. Corresponds to the JSON property commitments



286
287
288
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 286

def commitments
  @commitments
end

#scenario_configGoogle::Apis::CloudbillingV1beta::ScenarioConfig

Configuration for a CostScenario. Specifies how costs are calculated. Corresponds to the JSON property scenarioConfig



291
292
293
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 291

def scenario_config
  @scenario_config
end

#workloadsArray<Google::Apis::CloudbillingV1beta::Workload>

The Google Cloud usage whose costs are estimated. A maximum of 100 workloads can be provided. Corresponds to the JSON property workloads



297
298
299
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 297

def workloads
  @workloads
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



304
305
306
307
308
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 304

def update!(**args)
  @commitments = args[:commitments] if args.key?(:commitments)
  @scenario_config = args[:scenario_config] if args.key?(:scenario_config)
  @workloads = args[:workloads] if args.key?(:workloads)
end