google-apis-cloudbilling_v1beta 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1134 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module CloudbillingV1beta
24
+
25
+ # Specifies usage of Cloud Storage resources.
26
+ class CloudStorageWorkload
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # An amount of usage over a time frame.
30
+ # Corresponds to the JSON property `dataRetrieval`
31
+ # @return [Google::Apis::CloudbillingV1beta::Usage]
32
+ attr_accessor :data_retrieval
33
+
34
+ # An amount of usage over a time frame.
35
+ # Corresponds to the JSON property `dataStored`
36
+ # @return [Google::Apis::CloudbillingV1beta::Usage]
37
+ attr_accessor :data_stored
38
+
39
+ # Area contains dual locations.
40
+ # Corresponds to the JSON property `dualRegion`
41
+ # @return [Google::Apis::CloudbillingV1beta::DualRegional]
42
+ attr_accessor :dual_region
43
+
44
+ # Area contains multiple locations.
45
+ # Corresponds to the JSON property `multiRegion`
46
+ # @return [Google::Apis::CloudbillingV1beta::MultiRegional]
47
+ attr_accessor :multi_region
48
+
49
+ # An amount of usage over a time frame.
50
+ # Corresponds to the JSON property `operationA`
51
+ # @return [Google::Apis::CloudbillingV1beta::Usage]
52
+ attr_accessor :operation_a
53
+
54
+ # An amount of usage over a time frame.
55
+ # Corresponds to the JSON property `operationB`
56
+ # @return [Google::Apis::CloudbillingV1beta::Usage]
57
+ attr_accessor :operation_b
58
+
59
+ # Area contains only one location.
60
+ # Corresponds to the JSON property `region`
61
+ # @return [Google::Apis::CloudbillingV1beta::Regional]
62
+ attr_accessor :region
63
+
64
+ # The [storage class](https://cloud.google.com/storage/docs/storage-classes#
65
+ # classes) of the data and operation. For example: "standard" or "nearline".
66
+ # Corresponds to the JSON property `storageClass`
67
+ # @return [String]
68
+ attr_accessor :storage_class
69
+
70
+ def initialize(**args)
71
+ update!(**args)
72
+ end
73
+
74
+ # Update properties of this object
75
+ def update!(**args)
76
+ @data_retrieval = args[:data_retrieval] if args.key?(:data_retrieval)
77
+ @data_stored = args[:data_stored] if args.key?(:data_stored)
78
+ @dual_region = args[:dual_region] if args.key?(:dual_region)
79
+ @multi_region = args[:multi_region] if args.key?(:multi_region)
80
+ @operation_a = args[:operation_a] if args.key?(:operation_a)
81
+ @operation_b = args[:operation_b] if args.key?(:operation_b)
82
+ @region = args[:region] if args.key?(:region)
83
+ @storage_class = args[:storage_class] if args.key?(:storage_class)
84
+ end
85
+ end
86
+
87
+ # Commitments give you the ability to pay a recurring fee in exchange for a
88
+ # benefit, such as a discount for your use. For example, this object might
89
+ # contain details of a [spend-based committed use discount (CUD)](https://cloud.
90
+ # google.com/docs/cuds#spend_based_commitments). Within a CostScenario, adding a
91
+ # commitment includes the cost of the commitment and any discounts.
92
+ class Commitment
93
+ include Google::Apis::Core::Hashable
94
+
95
+ # Required. A name for this commitment. All commitments in a CostScenario must
96
+ # have unique names. Each name must be a maximum of 32 characters.
97
+ # Corresponds to the JSON property `name`
98
+ # @return [String]
99
+ attr_accessor :name
100
+
101
+ # Specifies a resource-based committed use discount (CUD).
102
+ # Corresponds to the JSON property `vmResourceBasedCud`
103
+ # @return [Google::Apis::CloudbillingV1beta::VmResourceBasedCud]
104
+ attr_accessor :vm_resource_based_cud
105
+
106
+ def initialize(**args)
107
+ update!(**args)
108
+ end
109
+
110
+ # Update properties of this object
111
+ def update!(**args)
112
+ @name = args[:name] if args.key?(:name)
113
+ @vm_resource_based_cud = args[:vm_resource_based_cud] if args.key?(:vm_resource_based_cud)
114
+ end
115
+ end
116
+
117
+ # Estimated cost for a commitment.
118
+ class CommitmentCostEstimate
119
+ include Google::Apis::Core::Hashable
120
+
121
+ # An estimated cost.
122
+ # Corresponds to the JSON property `commitmentTotalCostEstimate`
123
+ # @return [Google::Apis::CloudbillingV1beta::CostEstimate]
124
+ attr_accessor :commitment_total_cost_estimate
125
+
126
+ # The name of the commitment, as specified in the `CostScenario`.
127
+ # Corresponds to the JSON property `name`
128
+ # @return [String]
129
+ attr_accessor :name
130
+
131
+ # Estimated costs for each SKU in the commitment.
132
+ # Corresponds to the JSON property `skuCostEstimates`
133
+ # @return [Array<Google::Apis::CloudbillingV1beta::SkuCostEstimate>]
134
+ attr_accessor :sku_cost_estimates
135
+
136
+ def initialize(**args)
137
+ update!(**args)
138
+ end
139
+
140
+ # Update properties of this object
141
+ def update!(**args)
142
+ @commitment_total_cost_estimate = args[:commitment_total_cost_estimate] if args.key?(:commitment_total_cost_estimate)
143
+ @name = args[:name] if args.key?(:name)
144
+ @sku_cost_estimates = args[:sku_cost_estimates] if args.key?(:sku_cost_estimates)
145
+ end
146
+ end
147
+
148
+ # Specificies usage of a set of identical compute VM instances.
149
+ class ComputeVmWorkload
150
+ include Google::Apis::Core::Hashable
151
+
152
+ # Defines whether each instance has confidential compute enabled.
153
+ # Corresponds to the JSON property `enableConfidentialCompute`
154
+ # @return [Boolean]
155
+ attr_accessor :enable_confidential_compute
156
+ alias_method :enable_confidential_compute?, :enable_confidential_compute
157
+
158
+ # Specification of a set of guest accelerators attached to a machine.
159
+ # Corresponds to the JSON property `guestAccelerator`
160
+ # @return [Google::Apis::CloudbillingV1beta::GuestAccelerator]
161
+ attr_accessor :guest_accelerator
162
+
163
+ # An amount of usage over a time frame.
164
+ # Corresponds to the JSON property `instancesRunning`
165
+ # @return [Google::Apis::CloudbillingV1beta::Usage]
166
+ attr_accessor :instances_running
167
+
168
+ # Premium image licenses used by each instance.
169
+ # Corresponds to the JSON property `licenses`
170
+ # @return [Array<String>]
171
+ attr_accessor :licenses
172
+
173
+ # Specification of machine series, memory, and number of vCPUs.
174
+ # Corresponds to the JSON property `machineType`
175
+ # @return [Google::Apis::CloudbillingV1beta::MachineType]
176
+ attr_accessor :machine_type
177
+
178
+ # Persistent disks attached to each instance. Must include a boot disk.
179
+ # Corresponds to the JSON property `persistentDisks`
180
+ # @return [Array<Google::Apis::CloudbillingV1beta::PersistentDisk>]
181
+ attr_accessor :persistent_disks
182
+
183
+ # Defines whether each instance is preemptible.
184
+ # Corresponds to the JSON property `preemptible`
185
+ # @return [Boolean]
186
+ attr_accessor :preemptible
187
+ alias_method :preemptible?, :preemptible
188
+
189
+ # The [region](https://cloud.google.com/compute/docs/regions-zones) where the
190
+ # VMs run. For example: "us-central1".
191
+ # Corresponds to the JSON property `region`
192
+ # @return [String]
193
+ attr_accessor :region
194
+
195
+ def initialize(**args)
196
+ update!(**args)
197
+ end
198
+
199
+ # Update properties of this object
200
+ def update!(**args)
201
+ @enable_confidential_compute = args[:enable_confidential_compute] if args.key?(:enable_confidential_compute)
202
+ @guest_accelerator = args[:guest_accelerator] if args.key?(:guest_accelerator)
203
+ @instances_running = args[:instances_running] if args.key?(:instances_running)
204
+ @licenses = args[:licenses] if args.key?(:licenses)
205
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
206
+ @persistent_disks = args[:persistent_disks] if args.key?(:persistent_disks)
207
+ @preemptible = args[:preemptible] if args.key?(:preemptible)
208
+ @region = args[:region] if args.key?(:region)
209
+ end
210
+ end
211
+
212
+ # An estimated cost.
213
+ class CostEstimate
214
+ include Google::Apis::Core::Hashable
215
+
216
+ # The estimated credits applied.
217
+ # Corresponds to the JSON property `creditEstimates`
218
+ # @return [Array<Google::Apis::CloudbillingV1beta::CreditEstimate>]
219
+ attr_accessor :credit_estimates
220
+
221
+ # Represents an amount of money with its currency type.
222
+ # Corresponds to the JSON property `netCostEstimate`
223
+ # @return [Google::Apis::CloudbillingV1beta::Money]
224
+ attr_accessor :net_cost_estimate
225
+
226
+ # Represents an amount of money with its currency type.
227
+ # Corresponds to the JSON property `preCreditCostEstimate`
228
+ # @return [Google::Apis::CloudbillingV1beta::Money]
229
+ attr_accessor :pre_credit_cost_estimate
230
+
231
+ def initialize(**args)
232
+ update!(**args)
233
+ end
234
+
235
+ # Update properties of this object
236
+ def update!(**args)
237
+ @credit_estimates = args[:credit_estimates] if args.key?(:credit_estimates)
238
+ @net_cost_estimate = args[:net_cost_estimate] if args.key?(:net_cost_estimate)
239
+ @pre_credit_cost_estimate = args[:pre_credit_cost_estimate] if args.key?(:pre_credit_cost_estimate)
240
+ end
241
+ end
242
+
243
+ # The result of a estimating the costs of a `CostScenario`.
244
+ class CostEstimationResult
245
+ include Google::Apis::Core::Hashable
246
+
247
+ # Required. The ISO 4217 currency code for the cost estimate.
248
+ # Corresponds to the JSON property `currencyCode`
249
+ # @return [String]
250
+ attr_accessor :currency_code
251
+
252
+ # Required. Estimated costs for each idealized month of a `CostScenario`.
253
+ # Corresponds to the JSON property `segmentCostEstimates`
254
+ # @return [Array<Google::Apis::CloudbillingV1beta::SegmentCostEstimate>]
255
+ attr_accessor :segment_cost_estimates
256
+
257
+ # Required. Information about SKUs used in the estimate.
258
+ # Corresponds to the JSON property `skus`
259
+ # @return [Array<Google::Apis::CloudbillingV1beta::Sku>]
260
+ attr_accessor :skus
261
+
262
+ def initialize(**args)
263
+ update!(**args)
264
+ end
265
+
266
+ # Update properties of this object
267
+ def update!(**args)
268
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
269
+ @segment_cost_estimates = args[:segment_cost_estimates] if args.key?(:segment_cost_estimates)
270
+ @skus = args[:skus] if args.key?(:skus)
271
+ end
272
+ end
273
+
274
+ # Encapsulates all the information needed to perform a cost estimate. It
275
+ # includes a specification of the Google Cloud usage whose costs are estimated,
276
+ # and configuration options.
277
+ class CostScenario
278
+ include Google::Apis::Core::Hashable
279
+
280
+ # New commitments to estimate the costs for. The cost of the commitments will be
281
+ # included in the estimate result and discounts the commitment entitles will be
282
+ # included in the workload cost estimates. A maximum of 100 workloads can be
283
+ # provided.
284
+ # Corresponds to the JSON property `commitments`
285
+ # @return [Array<Google::Apis::CloudbillingV1beta::Commitment>]
286
+ attr_accessor :commitments
287
+
288
+ # Configuration for a CostScenario. Specifies how costs are calculated.
289
+ # Corresponds to the JSON property `scenarioConfig`
290
+ # @return [Google::Apis::CloudbillingV1beta::ScenarioConfig]
291
+ attr_accessor :scenario_config
292
+
293
+ # The Google Cloud usage whose costs are estimated. A maximum of 100 workloads
294
+ # can be provided.
295
+ # Corresponds to the JSON property `workloads`
296
+ # @return [Array<Google::Apis::CloudbillingV1beta::Workload>]
297
+ attr_accessor :workloads
298
+
299
+ def initialize(**args)
300
+ update!(**args)
301
+ end
302
+
303
+ # Update properties of this object
304
+ def update!(**args)
305
+ @commitments = args[:commitments] if args.key?(:commitments)
306
+ @scenario_config = args[:scenario_config] if args.key?(:scenario_config)
307
+ @workloads = args[:workloads] if args.key?(:workloads)
308
+ end
309
+ end
310
+
311
+ # An estimated credit applied to the costs on a SKU.
312
+ class CreditEstimate
313
+ include Google::Apis::Core::Hashable
314
+
315
+ # Represents an amount of money with its currency type.
316
+ # Corresponds to the JSON property `creditAmount`
317
+ # @return [Google::Apis::CloudbillingV1beta::Money]
318
+ attr_accessor :credit_amount
319
+
320
+ # The credit description.
321
+ # Corresponds to the JSON property `creditDescription`
322
+ # @return [String]
323
+ attr_accessor :credit_description
324
+
325
+ # The credit type.
326
+ # Corresponds to the JSON property `creditType`
327
+ # @return [String]
328
+ attr_accessor :credit_type
329
+
330
+ def initialize(**args)
331
+ update!(**args)
332
+ end
333
+
334
+ # Update properties of this object
335
+ def update!(**args)
336
+ @credit_amount = args[:credit_amount] if args.key?(:credit_amount)
337
+ @credit_description = args[:credit_description] if args.key?(:credit_description)
338
+ @credit_type = args[:credit_type] if args.key?(:credit_type)
339
+ end
340
+ end
341
+
342
+ # Specification of a custom machine type.
343
+ class CustomMachineType
344
+ include Google::Apis::Core::Hashable
345
+
346
+ # Required. The machine series. Only certain [machine series](https://cloud.
347
+ # google.com/compute/docs/general-purpose-machines#custom_machine_types) support
348
+ # custom configurations. For example: "n1".
349
+ # Corresponds to the JSON property `machineSeries`
350
+ # @return [String]
351
+ attr_accessor :machine_series
352
+
353
+ # Required. Memory size of the VM in GB (2^30 bytes). Must be an increment of 0.
354
+ # 25 (256 MB). Each [machine series](https://cloud.google.com/compute/docs/
355
+ # machine-types#machine_type_comparison) has limitations on allowed values for
356
+ # the ratio of memory-to-vCPU count.
357
+ # Corresponds to the JSON property `memorySizeGb`
358
+ # @return [Float]
359
+ attr_accessor :memory_size_gb
360
+
361
+ # Required. The number of vCPUs. The allowed values depend on the [machine
362
+ # series](https://cloud.google.com/compute/docs/machine-types#
363
+ # machine_type_comparison).
364
+ # Corresponds to the JSON property `virtualCpuCount`
365
+ # @return [Fixnum]
366
+ attr_accessor :virtual_cpu_count
367
+
368
+ def initialize(**args)
369
+ update!(**args)
370
+ end
371
+
372
+ # Update properties of this object
373
+ def update!(**args)
374
+ @machine_series = args[:machine_series] if args.key?(:machine_series)
375
+ @memory_size_gb = args[:memory_size_gb] if args.key?(:memory_size_gb)
376
+ @virtual_cpu_count = args[:virtual_cpu_count] if args.key?(:virtual_cpu_count)
377
+ end
378
+ end
379
+
380
+ # Area contains dual locations.
381
+ class DualRegional
382
+ include Google::Apis::Core::Hashable
383
+
384
+ # The [location name](https://cloud.google.com/storage/docs/locations#available-
385
+ # locations) where the data is stored. For example: "asia1" for dual region.
386
+ # Corresponds to the JSON property `name`
387
+ # @return [String]
388
+ attr_accessor :name
389
+
390
+ def initialize(**args)
391
+ update!(**args)
392
+ end
393
+
394
+ # Update properties of this object
395
+ def update!(**args)
396
+ @name = args[:name] if args.key?(:name)
397
+ end
398
+ end
399
+
400
+ # Request for EstimateCostScenarioForBillingAccount.
401
+ class EstimateCostScenarioForBillingAccountRequest
402
+ include Google::Apis::Core::Hashable
403
+
404
+ # Encapsulates all the information needed to perform a cost estimate. It
405
+ # includes a specification of the Google Cloud usage whose costs are estimated,
406
+ # and configuration options.
407
+ # Corresponds to the JSON property `costScenario`
408
+ # @return [Google::Apis::CloudbillingV1beta::CostScenario]
409
+ attr_accessor :cost_scenario
410
+
411
+ def initialize(**args)
412
+ update!(**args)
413
+ end
414
+
415
+ # Update properties of this object
416
+ def update!(**args)
417
+ @cost_scenario = args[:cost_scenario] if args.key?(:cost_scenario)
418
+ end
419
+ end
420
+
421
+ # Response for EstimateCostScenarioForBillingAccount
422
+ class EstimateCostScenarioForBillingAccountResponse
423
+ include Google::Apis::Core::Hashable
424
+
425
+ # The result of a estimating the costs of a `CostScenario`.
426
+ # Corresponds to the JSON property `costEstimationResult`
427
+ # @return [Google::Apis::CloudbillingV1beta::CostEstimationResult]
428
+ attr_accessor :cost_estimation_result
429
+
430
+ def initialize(**args)
431
+ update!(**args)
432
+ end
433
+
434
+ # Update properties of this object
435
+ def update!(**args)
436
+ @cost_estimation_result = args[:cost_estimation_result] if args.key?(:cost_estimation_result)
437
+ end
438
+ end
439
+
440
+ # Request for EstimateCostScenarioWithListPrice.
441
+ class EstimateCostScenarioWithListPriceRequest
442
+ include Google::Apis::Core::Hashable
443
+
444
+ # Encapsulates all the information needed to perform a cost estimate. It
445
+ # includes a specification of the Google Cloud usage whose costs are estimated,
446
+ # and configuration options.
447
+ # Corresponds to the JSON property `costScenario`
448
+ # @return [Google::Apis::CloudbillingV1beta::CostScenario]
449
+ attr_accessor :cost_scenario
450
+
451
+ def initialize(**args)
452
+ update!(**args)
453
+ end
454
+
455
+ # Update properties of this object
456
+ def update!(**args)
457
+ @cost_scenario = args[:cost_scenario] if args.key?(:cost_scenario)
458
+ end
459
+ end
460
+
461
+ # Response for EstimateCostScenarioWithListPrice
462
+ class EstimateCostScenarioWithListPriceResponse
463
+ include Google::Apis::Core::Hashable
464
+
465
+ # The result of a estimating the costs of a `CostScenario`.
466
+ # Corresponds to the JSON property `costEstimationResult`
467
+ # @return [Google::Apis::CloudbillingV1beta::CostEstimationResult]
468
+ attr_accessor :cost_estimation_result
469
+
470
+ def initialize(**args)
471
+ update!(**args)
472
+ end
473
+
474
+ # Update properties of this object
475
+ def update!(**args)
476
+ @cost_estimation_result = args[:cost_estimation_result] if args.key?(:cost_estimation_result)
477
+ end
478
+ end
479
+
480
+ # Represents a point in time.
481
+ class EstimationTimePoint
482
+ include Google::Apis::Core::Hashable
483
+
484
+ # The point in time, relative to the start of the time frame covered by the cost
485
+ # estimate.
486
+ # Corresponds to the JSON property `estimationTimeFrameOffset`
487
+ # @return [String]
488
+ attr_accessor :estimation_time_frame_offset
489
+
490
+ def initialize(**args)
491
+ update!(**args)
492
+ end
493
+
494
+ # Update properties of this object
495
+ def update!(**args)
496
+ @estimation_time_frame_offset = args[:estimation_time_frame_offset] if args.key?(:estimation_time_frame_offset)
497
+ end
498
+ end
499
+
500
+ # Specification of a set of guest accelerators attached to a machine.
501
+ class GuestAccelerator
502
+ include Google::Apis::Core::Hashable
503
+
504
+ # The number of the guest accelerator cards exposed to each instance.
505
+ # Corresponds to the JSON property `acceleratorCount`
506
+ # @return [Fixnum]
507
+ attr_accessor :accelerator_count
508
+
509
+ # The type of the guest accelerator cards. For example: "nvidia-tesla-t4".
510
+ # Corresponds to the JSON property `acceleratorType`
511
+ # @return [String]
512
+ attr_accessor :accelerator_type
513
+
514
+ def initialize(**args)
515
+ update!(**args)
516
+ end
517
+
518
+ # Update properties of this object
519
+ def update!(**args)
520
+ @accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count)
521
+ @accelerator_type = args[:accelerator_type] if args.key?(:accelerator_type)
522
+ end
523
+ end
524
+
525
+ # Specification of machine series, memory, and number of vCPUs.
526
+ class MachineType
527
+ include Google::Apis::Core::Hashable
528
+
529
+ # Specification of a custom machine type.
530
+ # Corresponds to the JSON property `customMachineType`
531
+ # @return [Google::Apis::CloudbillingV1beta::CustomMachineType]
532
+ attr_accessor :custom_machine_type
533
+
534
+ # Specification of a predefined machine type.
535
+ # Corresponds to the JSON property `predefinedMachineType`
536
+ # @return [Google::Apis::CloudbillingV1beta::PredefinedMachineType]
537
+ attr_accessor :predefined_machine_type
538
+
539
+ def initialize(**args)
540
+ update!(**args)
541
+ end
542
+
543
+ # Update properties of this object
544
+ def update!(**args)
545
+ @custom_machine_type = args[:custom_machine_type] if args.key?(:custom_machine_type)
546
+ @predefined_machine_type = args[:predefined_machine_type] if args.key?(:predefined_machine_type)
547
+ end
548
+ end
549
+
550
+ # Represents an amount of money with its currency type.
551
+ class Money
552
+ include Google::Apis::Core::Hashable
553
+
554
+ # The three-letter currency code defined in ISO 4217.
555
+ # Corresponds to the JSON property `currencyCode`
556
+ # @return [String]
557
+ attr_accessor :currency_code
558
+
559
+ # Number of nano (10^-9) units of the amount. The value must be between -999,999,
560
+ # 999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be
561
+ # positive or zero. If `units` is zero, `nanos` can be positive, zero, or
562
+ # negative. If `units` is negative, `nanos` must be negative or zero. For
563
+ # example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
564
+ # Corresponds to the JSON property `nanos`
565
+ # @return [Fixnum]
566
+ attr_accessor :nanos
567
+
568
+ # The whole units of the amount. For example if `currencyCode` is `"USD"`, then
569
+ # 1 unit is one US dollar.
570
+ # Corresponds to the JSON property `units`
571
+ # @return [Fixnum]
572
+ attr_accessor :units
573
+
574
+ def initialize(**args)
575
+ update!(**args)
576
+ end
577
+
578
+ # Update properties of this object
579
+ def update!(**args)
580
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
581
+ @nanos = args[:nanos] if args.key?(:nanos)
582
+ @units = args[:units] if args.key?(:units)
583
+ end
584
+ end
585
+
586
+ # Area contains multiple locations.
587
+ class MultiRegional
588
+ include Google::Apis::Core::Hashable
589
+
590
+ # The [location name](https://cloud.google.com/storage/docs/locations#available-
591
+ # locations) where the data is stored. For example: "us" for multi-region.
592
+ # Corresponds to the JSON property `name`
593
+ # @return [String]
594
+ attr_accessor :name
595
+
596
+ def initialize(**args)
597
+ update!(**args)
598
+ end
599
+
600
+ # Update properties of this object
601
+ def update!(**args)
602
+ @name = args[:name] if args.key?(:name)
603
+ end
604
+ end
605
+
606
+ # Specification of a persistent disk attached to a VM.
607
+ class PersistentDisk
608
+ include Google::Apis::Core::Hashable
609
+
610
+ # An amount of usage over a time frame.
611
+ # Corresponds to the JSON property `diskSize`
612
+ # @return [Google::Apis::CloudbillingV1beta::Usage]
613
+ attr_accessor :disk_size
614
+
615
+ # The [disk type](https://cloud.google.com/compute/docs/disks#disk-types). For
616
+ # example: "pd-standard".
617
+ # Corresponds to the JSON property `diskType`
618
+ # @return [String]
619
+ attr_accessor :disk_type
620
+
621
+ # An amount of usage over a time frame.
622
+ # Corresponds to the JSON property `provisionedIops`
623
+ # @return [Google::Apis::CloudbillingV1beta::Usage]
624
+ attr_accessor :provisioned_iops
625
+
626
+ # The geographic scope of the disk. Defaults to `SCOPE_ZONAL` if not specified.
627
+ # Corresponds to the JSON property `scope`
628
+ # @return [String]
629
+ attr_accessor :scope
630
+
631
+ def initialize(**args)
632
+ update!(**args)
633
+ end
634
+
635
+ # Update properties of this object
636
+ def update!(**args)
637
+ @disk_size = args[:disk_size] if args.key?(:disk_size)
638
+ @disk_type = args[:disk_type] if args.key?(:disk_type)
639
+ @provisioned_iops = args[:provisioned_iops] if args.key?(:provisioned_iops)
640
+ @scope = args[:scope] if args.key?(:scope)
641
+ end
642
+ end
643
+
644
+ # Specification of a predefined machine type.
645
+ class PredefinedMachineType
646
+ include Google::Apis::Core::Hashable
647
+
648
+ # The [machine type](https://cloud.google.com/compute/docs/machine-types). For
649
+ # example: "n1-standard1".
650
+ # Corresponds to the JSON property `machineType`
651
+ # @return [String]
652
+ attr_accessor :machine_type
653
+
654
+ def initialize(**args)
655
+ update!(**args)
656
+ end
657
+
658
+ # Update properties of this object
659
+ def update!(**args)
660
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
661
+ end
662
+ end
663
+
664
+ # The price of a SKU at a point int time.
665
+ class Price
666
+ include Google::Apis::Core::Hashable
667
+
668
+ # Represents a point in time.
669
+ # Corresponds to the JSON property `effectiveTime`
670
+ # @return [Google::Apis::CloudbillingV1beta::EstimationTimePoint]
671
+ attr_accessor :effective_time
672
+
673
+ # The type of price. Possible values: "RATE"
674
+ # Corresponds to the JSON property `priceType`
675
+ # @return [String]
676
+ attr_accessor :price_type
677
+
678
+ # A SKU price consisting of tiered rates.
679
+ # Corresponds to the JSON property `rate`
680
+ # @return [Google::Apis::CloudbillingV1beta::Rate]
681
+ attr_accessor :rate
682
+
683
+ def initialize(**args)
684
+ update!(**args)
685
+ end
686
+
687
+ # Update properties of this object
688
+ def update!(**args)
689
+ @effective_time = args[:effective_time] if args.key?(:effective_time)
690
+ @price_type = args[:price_type] if args.key?(:price_type)
691
+ @rate = args[:rate] if args.key?(:rate)
692
+ end
693
+ end
694
+
695
+ # A SKU price consisting of tiered rates.
696
+ class Rate
697
+ include Google::Apis::Core::Hashable
698
+
699
+ # The service tiers.
700
+ # Corresponds to the JSON property `tiers`
701
+ # @return [Array<Google::Apis::CloudbillingV1beta::RateTier>]
702
+ attr_accessor :tiers
703
+
704
+ # The SKU's pricing unit. For example, if the tier price is $1 per 1000000 Bytes,
705
+ # then this field will show 'By'. The `start_amount` field in each tier will be
706
+ # in this unit.
707
+ # Corresponds to the JSON property `unit`
708
+ # @return [String]
709
+ attr_accessor :unit
710
+
711
+ # The SKU's count for the pricing unit. For example, if the tier price is $1 per
712
+ # 1000000 Bytes, then this column will show 1000000.
713
+ # Corresponds to the JSON property `unitCount`
714
+ # @return [Float]
715
+ attr_accessor :unit_count
716
+
717
+ def initialize(**args)
718
+ update!(**args)
719
+ end
720
+
721
+ # Update properties of this object
722
+ def update!(**args)
723
+ @tiers = args[:tiers] if args.key?(:tiers)
724
+ @unit = args[:unit] if args.key?(:unit)
725
+ @unit_count = args[:unit_count] if args.key?(:unit_count)
726
+ end
727
+ end
728
+
729
+ # Pricing details for a service tier.
730
+ class RateTier
731
+ include Google::Apis::Core::Hashable
732
+
733
+ # Represents an amount of money with its currency type.
734
+ # Corresponds to the JSON property `price`
735
+ # @return [Google::Apis::CloudbillingV1beta::Money]
736
+ attr_accessor :price
737
+
738
+ # The magnitude of usage in which the tier interval begins. Example: "From 100
739
+ # GiBi the price is $1 per byte" implies `start_amount` = 100
740
+ # Corresponds to the JSON property `startAmount`
741
+ # @return [Float]
742
+ attr_accessor :start_amount
743
+
744
+ def initialize(**args)
745
+ update!(**args)
746
+ end
747
+
748
+ # Update properties of this object
749
+ def update!(**args)
750
+ @price = args[:price] if args.key?(:price)
751
+ @start_amount = args[:start_amount] if args.key?(:start_amount)
752
+ end
753
+ end
754
+
755
+ # Area contains only one location.
756
+ class Regional
757
+ include Google::Apis::Core::Hashable
758
+
759
+ # The [location name](https://cloud.google.com/storage/docs/locations#available-
760
+ # locations). For example: "us-central1" for region.
761
+ # Corresponds to the JSON property `name`
762
+ # @return [String]
763
+ attr_accessor :name
764
+
765
+ def initialize(**args)
766
+ update!(**args)
767
+ end
768
+
769
+ # Update properties of this object
770
+ def update!(**args)
771
+ @name = args[:name] if args.key?(:name)
772
+ end
773
+ end
774
+
775
+ # Configuration for a CostScenario. Specifies how costs are calculated.
776
+ class ScenarioConfig
777
+ include Google::Apis::Core::Hashable
778
+
779
+ # Time frame for the estimate. Workloads must specify usage for this duration.
780
+ # Duration must be at least 1 hour (3,600 seconds) and at most 10 years (315,360,
781
+ # 000 seconds). The calculations for years and months are based on a 730-hour (2,
782
+ # 628,000-second) month.
783
+ # Corresponds to the JSON property `estimateDuration`
784
+ # @return [String]
785
+ attr_accessor :estimate_duration
786
+
787
+ def initialize(**args)
788
+ update!(**args)
789
+ end
790
+
791
+ # Update properties of this object
792
+ def update!(**args)
793
+ @estimate_duration = args[:estimate_duration] if args.key?(:estimate_duration)
794
+ end
795
+ end
796
+
797
+ # Workload cost estimates for a single time segment.
798
+ class SegmentCostEstimate
799
+ include Google::Apis::Core::Hashable
800
+
801
+ # Estimated costs for each commitment.
802
+ # Corresponds to the JSON property `commitmentCostEstimates`
803
+ # @return [Array<Google::Apis::CloudbillingV1beta::CommitmentCostEstimate>]
804
+ attr_accessor :commitment_cost_estimates
805
+
806
+ # Represents a point in time.
807
+ # Corresponds to the JSON property `segmentStartTime`
808
+ # @return [Google::Apis::CloudbillingV1beta::EstimationTimePoint]
809
+ attr_accessor :segment_start_time
810
+
811
+ # An estimated cost.
812
+ # Corresponds to the JSON property `segmentTotalCostEstimate`
813
+ # @return [Google::Apis::CloudbillingV1beta::CostEstimate]
814
+ attr_accessor :segment_total_cost_estimate
815
+
816
+ # Estimated costs for each workload.
817
+ # Corresponds to the JSON property `workloadCostEstimates`
818
+ # @return [Array<Google::Apis::CloudbillingV1beta::WorkloadCostEstimate>]
819
+ attr_accessor :workload_cost_estimates
820
+
821
+ def initialize(**args)
822
+ update!(**args)
823
+ end
824
+
825
+ # Update properties of this object
826
+ def update!(**args)
827
+ @commitment_cost_estimates = args[:commitment_cost_estimates] if args.key?(:commitment_cost_estimates)
828
+ @segment_start_time = args[:segment_start_time] if args.key?(:segment_start_time)
829
+ @segment_total_cost_estimate = args[:segment_total_cost_estimate] if args.key?(:segment_total_cost_estimate)
830
+ @workload_cost_estimates = args[:workload_cost_estimates] if args.key?(:workload_cost_estimates)
831
+ end
832
+ end
833
+
834
+ # Information about SKUs appearing in the cost estimate.
835
+ class Sku
836
+ include Google::Apis::Core::Hashable
837
+
838
+ # The display name for the SKU. Example: A2 Instance Core running in Americas
839
+ # Corresponds to the JSON property `displayName`
840
+ # @return [String]
841
+ attr_accessor :display_name
842
+
843
+ # A timeline of prices for a SKU in chronological order. Note: The API currently
844
+ # only supports using a constant price for the entire estimation time frame so
845
+ # this list will contain a single value.
846
+ # Corresponds to the JSON property `prices`
847
+ # @return [Array<Google::Apis::CloudbillingV1beta::Price>]
848
+ attr_accessor :prices
849
+
850
+ # The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-
851
+ # CD31-42FE"
852
+ # Corresponds to the JSON property `sku`
853
+ # @return [String]
854
+ attr_accessor :sku
855
+
856
+ def initialize(**args)
857
+ update!(**args)
858
+ end
859
+
860
+ # Update properties of this object
861
+ def update!(**args)
862
+ @display_name = args[:display_name] if args.key?(:display_name)
863
+ @prices = args[:prices] if args.key?(:prices)
864
+ @sku = args[:sku] if args.key?(:sku)
865
+ end
866
+ end
867
+
868
+ # Estimated cost for usage on a SKU.
869
+ class SkuCostEstimate
870
+ include Google::Apis::Core::Hashable
871
+
872
+ # An estimated cost.
873
+ # Corresponds to the JSON property `costEstimate`
874
+ # @return [Google::Apis::CloudbillingV1beta::CostEstimate]
875
+ attr_accessor :cost_estimate
876
+
877
+ # The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-
878
+ # CD31-42FE" More information about the SKU can be found in the `skus` field of
879
+ # the `CostEstimationResult`.
880
+ # Corresponds to the JSON property `sku`
881
+ # @return [String]
882
+ attr_accessor :sku
883
+
884
+ # The amount of usage on this SKU.
885
+ # Corresponds to the JSON property `usageAmount`
886
+ # @return [Float]
887
+ attr_accessor :usage_amount
888
+
889
+ # The unit for the usage on this SKU.
890
+ # Corresponds to the JSON property `usageUnit`
891
+ # @return [String]
892
+ attr_accessor :usage_unit
893
+
894
+ def initialize(**args)
895
+ update!(**args)
896
+ end
897
+
898
+ # Update properties of this object
899
+ def update!(**args)
900
+ @cost_estimate = args[:cost_estimate] if args.key?(:cost_estimate)
901
+ @sku = args[:sku] if args.key?(:sku)
902
+ @usage_amount = args[:usage_amount] if args.key?(:usage_amount)
903
+ @usage_unit = args[:usage_unit] if args.key?(:usage_unit)
904
+ end
905
+ end
906
+
907
+ # An amount of usage over a time frame.
908
+ class Usage
909
+ include Google::Apis::Core::Hashable
910
+
911
+ # A timeline of usage rates. Consists of a series of entries, each of which
912
+ # specifies a constant rate of usage during a time interval. Each entry contains
913
+ # an effective time. The usage rate is in effect from that time until the
914
+ # effective time of the subsequent entry, or, for the last entry, for the
915
+ # remaining portion of estimation time frame. Effective times are specified as
916
+ # an offset into the estimation time frame. Usage is considered to be zero until
917
+ # the `effective_time` of the first entry. All subsequent entries must have an
918
+ # effective time greater than the previous entry and less than the estimate time
919
+ # frame. The effective time on all entries must be an integer number of hours.
920
+ # Corresponds to the JSON property `usageRateTimeline`
921
+ # @return [Google::Apis::CloudbillingV1beta::UsageRateTimeline]
922
+ attr_accessor :usage_rate_timeline
923
+
924
+ def initialize(**args)
925
+ update!(**args)
926
+ end
927
+
928
+ # Update properties of this object
929
+ def update!(**args)
930
+ @usage_rate_timeline = args[:usage_rate_timeline] if args.key?(:usage_rate_timeline)
931
+ end
932
+ end
933
+
934
+ # A timeline of usage rates. Consists of a series of entries, each of which
935
+ # specifies a constant rate of usage during a time interval. Each entry contains
936
+ # an effective time. The usage rate is in effect from that time until the
937
+ # effective time of the subsequent entry, or, for the last entry, for the
938
+ # remaining portion of estimation time frame. Effective times are specified as
939
+ # an offset into the estimation time frame. Usage is considered to be zero until
940
+ # the `effective_time` of the first entry. All subsequent entries must have an
941
+ # effective time greater than the previous entry and less than the estimate time
942
+ # frame. The effective time on all entries must be an integer number of hours.
943
+ class UsageRateTimeline
944
+ include Google::Apis::Core::Hashable
945
+
946
+ # The unit for the usage rate in each timeline entry. The supported units are a
947
+ # subset of [The Unified Code for Units of Measure](https://ucum.org/ucum.html)
948
+ # standard: * **Time units (TIME-UNIT)** * `s` second * `min` minute * `h` hour *
949
+ # `d` day * `wk` week * `mo` month * `yr` year * `ms` millisecond * `us`
950
+ # microsecond * `ns` nanosecond * **Basic storage units (BASIC-STORAGE-UNIT)** *
951
+ # `bit` bit * `By` byte * **Count units (COUNT-UNIT)** * `count` count * **
952
+ # Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T`
953
+ # tera (10^12) * `P` peta (10^15) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi`
954
+ # gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also
955
+ # includes these connectors: * `/` division or ratio (as an infix operator). For
956
+ # example: `kBy/`email`` or `MiBy/10ms`. * `.` multiplication or composition (as
957
+ # an infix operator). For example: `GBy.d` or `k`watt`.h`. The grammar for a
958
+ # unit is as follows: ``` Expression = Component ` "." Component ` ` "/"
959
+ # Component ` ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] |
960
+ # Annotation | "1" ; UNIT = TIME-UNIT | STORAGE-UNIT | DATA-UNIT | COUNT-UNIT
961
+ # Annotation = "`" NAME "`" ; ``` Examples: * Request per second: `1/s` or ``
962
+ # requests`/s` * GibiBytes: `GiBy` * GibiBytes * seconds: `GiBy.s`
963
+ # Corresponds to the JSON property `unit`
964
+ # @return [String]
965
+ attr_accessor :unit
966
+
967
+ # The timeline entries. Each entry has a start time and usage rate. The start
968
+ # time specifies the effective time of the usage rate. The entries must be
969
+ # sorted by start time in an increasing order.
970
+ # Corresponds to the JSON property `usageRateTimelineEntries`
971
+ # @return [Array<Google::Apis::CloudbillingV1beta::UsageRateTimelineEntry>]
972
+ attr_accessor :usage_rate_timeline_entries
973
+
974
+ def initialize(**args)
975
+ update!(**args)
976
+ end
977
+
978
+ # Update properties of this object
979
+ def update!(**args)
980
+ @unit = args[:unit] if args.key?(:unit)
981
+ @usage_rate_timeline_entries = args[:usage_rate_timeline_entries] if args.key?(:usage_rate_timeline_entries)
982
+ end
983
+ end
984
+
985
+ # A usage rate timeline entry. Each entry specifies a constant usage rate during
986
+ # a time interval.
987
+ class UsageRateTimelineEntry
988
+ include Google::Apis::Core::Hashable
989
+
990
+ # Represents a point in time.
991
+ # Corresponds to the JSON property `effectiveTime`
992
+ # @return [Google::Apis::CloudbillingV1beta::EstimationTimePoint]
993
+ attr_accessor :effective_time
994
+
995
+ # The usage rate.
996
+ # Corresponds to the JSON property `usageRate`
997
+ # @return [Float]
998
+ attr_accessor :usage_rate
999
+
1000
+ def initialize(**args)
1001
+ update!(**args)
1002
+ end
1003
+
1004
+ # Update properties of this object
1005
+ def update!(**args)
1006
+ @effective_time = args[:effective_time] if args.key?(:effective_time)
1007
+ @usage_rate = args[:usage_rate] if args.key?(:usage_rate)
1008
+ end
1009
+ end
1010
+
1011
+ # Specifies a resource-based committed use discount (CUD).
1012
+ class VmResourceBasedCud
1013
+ include Google::Apis::Core::Hashable
1014
+
1015
+ # Specification of a set of guest accelerators attached to a machine.
1016
+ # Corresponds to the JSON property `guestAccelerator`
1017
+ # @return [Google::Apis::CloudbillingV1beta::GuestAccelerator]
1018
+ attr_accessor :guest_accelerator
1019
+
1020
+ # The machine series for CUD. For example: "n1" for general purpose N1 machine
1021
+ # type commitments. "n2" for general purpose N2 machine type commitments. "e2"
1022
+ # for general purpose E2 machine type commitments. "n2d" for general purpose N2D
1023
+ # machine type commitments. "t2d" for general purpose T2D machine type
1024
+ # commitments. "c2"/"c2d" for compute-optimized commitments. "m1"/"m2" for the
1025
+ # memory-optimized commitments. "a2' for the accelerator-optimized commitments.
1026
+ # Corresponds to the JSON property `machineSeries`
1027
+ # @return [String]
1028
+ attr_accessor :machine_series
1029
+
1030
+ # Memory size of the VM in GB (2^30 bytes). Must be an increment of 0.25 (256 MB)
1031
+ # .
1032
+ # Corresponds to the JSON property `memorySizeGb`
1033
+ # @return [Float]
1034
+ attr_accessor :memory_size_gb
1035
+
1036
+ # Commitment usage plan.
1037
+ # Corresponds to the JSON property `plan`
1038
+ # @return [String]
1039
+ attr_accessor :plan
1040
+
1041
+ # The region where the VM runs. For example: "us-central1"
1042
+ # Corresponds to the JSON property `region`
1043
+ # @return [String]
1044
+ attr_accessor :region
1045
+
1046
+ # The number of vCPUs. The number of vCPUs must be an integer of 0 or more and
1047
+ # can be even or odd.
1048
+ # Corresponds to the JSON property `virtualCpuCount`
1049
+ # @return [Fixnum]
1050
+ attr_accessor :virtual_cpu_count
1051
+
1052
+ def initialize(**args)
1053
+ update!(**args)
1054
+ end
1055
+
1056
+ # Update properties of this object
1057
+ def update!(**args)
1058
+ @guest_accelerator = args[:guest_accelerator] if args.key?(:guest_accelerator)
1059
+ @machine_series = args[:machine_series] if args.key?(:machine_series)
1060
+ @memory_size_gb = args[:memory_size_gb] if args.key?(:memory_size_gb)
1061
+ @plan = args[:plan] if args.key?(:plan)
1062
+ @region = args[:region] if args.key?(:region)
1063
+ @virtual_cpu_count = args[:virtual_cpu_count] if args.key?(:virtual_cpu_count)
1064
+ end
1065
+ end
1066
+
1067
+ # Specifies usage on a single Google Cloud product over a time frame. Each
1068
+ # Google Cloud product has its own message, containing specific product
1069
+ # configuration parameters of the product usage amounts along each dimension in
1070
+ # which the product is billed.
1071
+ class Workload
1072
+ include Google::Apis::Core::Hashable
1073
+
1074
+ # Specifies usage of Cloud Storage resources.
1075
+ # Corresponds to the JSON property `cloudStorageWorkload`
1076
+ # @return [Google::Apis::CloudbillingV1beta::CloudStorageWorkload]
1077
+ attr_accessor :cloud_storage_workload
1078
+
1079
+ # Specificies usage of a set of identical compute VM instances.
1080
+ # Corresponds to the JSON property `computeVmWorkload`
1081
+ # @return [Google::Apis::CloudbillingV1beta::ComputeVmWorkload]
1082
+ attr_accessor :compute_vm_workload
1083
+
1084
+ # Required. A name for this workload. All workloads in a `CostScenario` must
1085
+ # have a unique `name`. Each `name` must be a maximum of 32 characters.
1086
+ # Corresponds to the JSON property `name`
1087
+ # @return [String]
1088
+ attr_accessor :name
1089
+
1090
+ def initialize(**args)
1091
+ update!(**args)
1092
+ end
1093
+
1094
+ # Update properties of this object
1095
+ def update!(**args)
1096
+ @cloud_storage_workload = args[:cloud_storage_workload] if args.key?(:cloud_storage_workload)
1097
+ @compute_vm_workload = args[:compute_vm_workload] if args.key?(:compute_vm_workload)
1098
+ @name = args[:name] if args.key?(:name)
1099
+ end
1100
+ end
1101
+
1102
+ # Estimated cost for a workload.
1103
+ class WorkloadCostEstimate
1104
+ include Google::Apis::Core::Hashable
1105
+
1106
+ # The name of the workload, as specified in the `CostScenario`.
1107
+ # Corresponds to the JSON property `name`
1108
+ # @return [String]
1109
+ attr_accessor :name
1110
+
1111
+ # Estimated costs for each SKU in the workload.
1112
+ # Corresponds to the JSON property `skuCostEstimates`
1113
+ # @return [Array<Google::Apis::CloudbillingV1beta::SkuCostEstimate>]
1114
+ attr_accessor :sku_cost_estimates
1115
+
1116
+ # An estimated cost.
1117
+ # Corresponds to the JSON property `workloadTotalCostEstimate`
1118
+ # @return [Google::Apis::CloudbillingV1beta::CostEstimate]
1119
+ attr_accessor :workload_total_cost_estimate
1120
+
1121
+ def initialize(**args)
1122
+ update!(**args)
1123
+ end
1124
+
1125
+ # Update properties of this object
1126
+ def update!(**args)
1127
+ @name = args[:name] if args.key?(:name)
1128
+ @sku_cost_estimates = args[:sku_cost_estimates] if args.key?(:sku_cost_estimates)
1129
+ @workload_total_cost_estimate = args[:workload_total_cost_estimate] if args.key?(:workload_total_cost_estimate)
1130
+ end
1131
+ end
1132
+ end
1133
+ end
1134
+ end