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.



487
488
489
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 487

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



474
475
476
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 474

def commitments
  @commitments
end

#scenario_configGoogle::Apis::CloudbillingV1beta::ScenarioConfig

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



479
480
481
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 479

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



485
486
487
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 485

def workloads
  @workloads
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



492
493
494
495
496
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 492

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