google-cloud-bigquery-reservation-v1 0.6.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,10 +38,10 @@ module Google
38
38
  # Queries using this reservation might use more slots during runtime if
39
39
  # ignore_idle_slots is set to false.
40
40
  #
41
- # If the new reservation's slot capacity exceeds the project's slot capacity
42
- # or if total slot capacity of the new reservation and its siblings exceeds
43
- # the project's slot capacity, the request will fail with
44
- # `google.rpc.Code.RESOURCE_EXHAUSTED`.
41
+ # If total slot_capacity of the reservation and its siblings
42
+ # exceeds the total slot_count of all capacity commitments, the request will
43
+ # fail with `google.rpc.Code.RESOURCE_EXHAUSTED`.
44
+ #
45
45
  #
46
46
  # NOTE: for reservations in US or EU multi-regions, slot capacity constraints
47
47
  # are checked separately for default and auxiliary regions. See
@@ -52,13 +52,20 @@ module Google
52
52
  # slots from other reservations within the same admin project. If true, a
53
53
  # query or pipeline job using this reservation will execute with the slot
54
54
  # capacity specified in the slot_capacity field at most.
55
+ # @!attribute [rw] autoscale
56
+ # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::Autoscale]
57
+ # The configuration parameters for the auto scaling feature. Note this is an
58
+ # alpha feature.
55
59
  # @!attribute [rw] concurrency
56
60
  # @return [::Integer]
57
- # Maximum number of queries that are allowed to run concurrently in this
58
- # reservation. This is a soft limit due to asynchronous nature of the system
59
- # and various optimizations for small queries.
60
- # Default value is 0 which means that concurrency will be automatically set
61
- # based on the reservation size.
61
+ # Job concurrency target which sets a soft upper bound on the number of jobs
62
+ # that can run concurrently in this reservation. This is a soft target due to
63
+ # asynchronous nature of the system and various optimizations for small
64
+ # queries.
65
+ # Default value is 0 which means that concurrency target will be
66
+ # automatically computed by the system.
67
+ # NOTE: this field is exposed as `target_job_concurrency` in the Information
68
+ # Schema, DDL and BQ CLI.
62
69
  # @!attribute [r] creation_time
63
70
  # @return [::Google::Protobuf::Timestamp]
64
71
  # Output only. Creation time of the reservation.
@@ -73,9 +80,25 @@ module Google
73
80
  # If set to true, this reservation is placed in the organization's
74
81
  # secondary region which is designated for disaster recovery purposes.
75
82
  # If false, this reservation is placed in the organization's default region.
83
+ # @!attribute [rw] edition
84
+ # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition]
85
+ # Edition of the reservation.
76
86
  class Reservation
77
87
  include ::Google::Protobuf::MessageExts
78
88
  extend ::Google::Protobuf::MessageExts::ClassMethods
89
+
90
+ # Auto scaling settings.
91
+ # @!attribute [r] current_slots
92
+ # @return [::Integer]
93
+ # Output only. The slot capacity added to this reservation when autoscale
94
+ # happens. Will be between [0, max_slots].
95
+ # @!attribute [rw] max_slots
96
+ # @return [::Integer]
97
+ # Number of slots to be scaled when needed.
98
+ class Autoscale
99
+ include ::Google::Protobuf::MessageExts
100
+ extend ::Google::Protobuf::MessageExts::ClassMethods
101
+ end
79
102
  end
80
103
 
81
104
  # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
@@ -106,12 +129,12 @@ module Google
106
129
  # Output only. State of the commitment.
107
130
  # @!attribute [r] commitment_start_time
108
131
  # @return [::Google::Protobuf::Timestamp]
109
- # Output only. The start of the current commitment period. It is applicable only for
110
- # ACTIVE capacity commitments.
132
+ # Output only. The start of the current commitment period. It is applicable
133
+ # only for ACTIVE capacity commitments.
111
134
  # @!attribute [r] commitment_end_time
112
135
  # @return [::Google::Protobuf::Timestamp]
113
- # Output only. The end of the current commitment period. It is applicable only for ACTIVE
114
- # capacity commitments.
136
+ # Output only. The end of the current commitment period. It is applicable
137
+ # only for ACTIVE capacity commitments.
115
138
  # @!attribute [r] failure_status
116
139
  # @return [::Google::Rpc::Status]
117
140
  # Output only. For FAILED commitment plan, provides the reason of failure.
@@ -128,6 +151,9 @@ module Google
128
151
  # If set to true, this commitment is placed in the organization's
129
152
  # secondary region which is designated for disaster recovery purposes.
130
153
  # If false, this commitment is placed in the organization's default region.
154
+ # @!attribute [rw] edition
155
+ # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition]
156
+ # Edition of the capacity commitment.
131
157
  class CapacityCommitment
132
158
  include ::Google::Protobuf::MessageExts
133
159
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -144,6 +170,10 @@ module Google
144
170
  # any time.
145
171
  FLEX = 3
146
172
 
173
+ # Same as FLEX, should only be used if flat-rate commitments are still
174
+ # available.
175
+ FLEX_FLAT_RATE = 7
176
+
147
177
  # Trial commitments have a committed period of 182 days after becoming
148
178
  # ACTIVE. After that, they are converted to a new commitment based on the
149
179
  # `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so
@@ -155,10 +185,31 @@ module Google
155
185
  # removed any time.
156
186
  MONTHLY = 2
157
187
 
188
+ # Same as MONTHLY, should only be used if flat-rate commitments are still
189
+ # available.
190
+ MONTHLY_FLAT_RATE = 8
191
+
158
192
  # Annual commitments have a committed period of 365 days after becoming
159
193
  # ACTIVE. After that they are converted to a new commitment based on the
160
194
  # renewal_plan.
161
195
  ANNUAL = 4
196
+
197
+ # Same as ANNUAL, should only be used if flat-rate commitments are still
198
+ # available.
199
+ ANNUAL_FLAT_RATE = 9
200
+
201
+ # 3-year commitments have a committed period of 1095(3 * 365) days after
202
+ # becoming ACTIVE. After that they are converted to a new commitment based
203
+ # on the renewal_plan.
204
+ THREE_YEAR = 10
205
+
206
+ # Should only be used for `renewal_plan` and is only meaningful if
207
+ # edition is specified to values other than EDITION_UNSPECIFIED. Otherwise
208
+ # CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will
209
+ # be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the
210
+ # renewal_plan is NONE, capacity commitment will be removed at the end of
211
+ # its commitment period.
212
+ NONE = 6
162
213
  end
163
214
 
164
215
  # Capacity commitment can either become ACTIVE right away or transition
@@ -180,7 +231,8 @@ module Google
180
231
  end
181
232
  end
182
233
 
183
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation ReservationService.CreateReservation}.
234
+ # The request for
235
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation ReservationService.CreateReservation}.
184
236
  # @!attribute [rw] parent
185
237
  # @return [::String]
186
238
  # Required. Project, location. E.g.,
@@ -198,7 +250,8 @@ module Google
198
250
  extend ::Google::Protobuf::MessageExts::ClassMethods
199
251
  end
200
252
 
201
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}.
253
+ # The request for
254
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}.
202
255
  # @!attribute [rw] parent
203
256
  # @return [::String]
204
257
  # Required. The parent resource name containing project and location, e.g.:
@@ -214,7 +267,8 @@ module Google
214
267
  extend ::Google::Protobuf::MessageExts::ClassMethods
215
268
  end
216
269
 
217
- # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}.
270
+ # The response for
271
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}.
218
272
  # @!attribute [rw] reservations
219
273
  # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Reservation>]
220
274
  # List of reservations visible to the user.
@@ -227,7 +281,8 @@ module Google
227
281
  extend ::Google::Protobuf::MessageExts::ClassMethods
228
282
  end
229
283
 
230
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation ReservationService.GetReservation}.
284
+ # The request for
285
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation ReservationService.GetReservation}.
231
286
  # @!attribute [rw] name
232
287
  # @return [::String]
233
288
  # Required. Resource name of the reservation to retrieve. E.g.,
@@ -237,7 +292,8 @@ module Google
237
292
  extend ::Google::Protobuf::MessageExts::ClassMethods
238
293
  end
239
294
 
240
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation ReservationService.DeleteReservation}.
295
+ # The request for
296
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation ReservationService.DeleteReservation}.
241
297
  # @!attribute [rw] name
242
298
  # @return [::String]
243
299
  # Required. Resource name of the reservation to retrieve. E.g.,
@@ -247,7 +303,8 @@ module Google
247
303
  extend ::Google::Protobuf::MessageExts::ClassMethods
248
304
  end
249
305
 
250
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation ReservationService.UpdateReservation}.
306
+ # The request for
307
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation ReservationService.UpdateReservation}.
251
308
  # @!attribute [rw] reservation
252
309
  # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation]
253
310
  # Content of the reservation to update.
@@ -259,7 +316,8 @@ module Google
259
316
  extend ::Google::Protobuf::MessageExts::ClassMethods
260
317
  end
261
318
 
262
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment ReservationService.CreateCapacityCommitment}.
319
+ # The request for
320
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment ReservationService.CreateCapacityCommitment}.
263
321
  # @!attribute [rw] parent
264
322
  # @return [::String]
265
323
  # Required. Resource name of the parent reservation. E.g.,
@@ -283,7 +341,8 @@ module Google
283
341
  extend ::Google::Protobuf::MessageExts::ClassMethods
284
342
  end
285
343
 
286
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}.
344
+ # The request for
345
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}.
287
346
  # @!attribute [rw] parent
288
347
  # @return [::String]
289
348
  # Required. Resource name of the parent reservation. E.g.,
@@ -299,7 +358,8 @@ module Google
299
358
  extend ::Google::Protobuf::MessageExts::ClassMethods
300
359
  end
301
360
 
302
- # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}.
361
+ # The response for
362
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}.
303
363
  # @!attribute [rw] capacity_commitments
304
364
  # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>]
305
365
  # List of capacity commitments visible to the user.
@@ -312,7 +372,8 @@ module Google
312
372
  extend ::Google::Protobuf::MessageExts::ClassMethods
313
373
  end
314
374
 
315
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment ReservationService.GetCapacityCommitment}.
375
+ # The request for
376
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment ReservationService.GetCapacityCommitment}.
316
377
  # @!attribute [rw] name
317
378
  # @return [::String]
318
379
  # Required. Resource name of the capacity commitment to retrieve. E.g.,
@@ -322,7 +383,8 @@ module Google
322
383
  extend ::Google::Protobuf::MessageExts::ClassMethods
323
384
  end
324
385
 
325
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment ReservationService.DeleteCapacityCommitment}.
386
+ # The request for
387
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment ReservationService.DeleteCapacityCommitment}.
326
388
  # @!attribute [rw] name
327
389
  # @return [::String]
328
390
  # Required. Resource name of the capacity commitment to delete. E.g.,
@@ -337,7 +399,8 @@ module Google
337
399
  extend ::Google::Protobuf::MessageExts::ClassMethods
338
400
  end
339
401
 
340
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment ReservationService.UpdateCapacityCommitment}.
402
+ # The request for
403
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment ReservationService.UpdateCapacityCommitment}.
341
404
  # @!attribute [rw] capacity_commitment
342
405
  # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
343
406
  # Content of the capacity commitment to update.
@@ -349,7 +412,8 @@ module Google
349
412
  extend ::Google::Protobuf::MessageExts::ClassMethods
350
413
  end
351
414
 
352
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}.
415
+ # The request for
416
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}.
353
417
  # @!attribute [rw] name
354
418
  # @return [::String]
355
419
  # Required. The resource name e.g.,:
@@ -362,7 +426,8 @@ module Google
362
426
  extend ::Google::Protobuf::MessageExts::ClassMethods
363
427
  end
364
428
 
365
- # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}.
429
+ # The response for
430
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}.
366
431
  # @!attribute [rw] first
367
432
  # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
368
433
  # First capacity commitment, result of a split.
@@ -374,7 +439,8 @@ module Google
374
439
  extend ::Google::Protobuf::MessageExts::ClassMethods
375
440
  end
376
441
 
377
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments ReservationService.MergeCapacityCommitments}.
442
+ # The request for
443
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments ReservationService.MergeCapacityCommitments}.
378
444
  # @!attribute [rw] parent
379
445
  # @return [::String]
380
446
  # Parent resource that identifies admin project and location e.g.,
@@ -428,6 +494,9 @@ module Google
428
494
  # BigQuery ML jobs that use services external to BigQuery for model
429
495
  # training. These jobs will not utilize idle slots from other reservations.
430
496
  ML_EXTERNAL = 3
497
+
498
+ # Background jobs that BigQuery runs for the customers in the background.
499
+ BACKGROUND = 4
431
500
  end
432
501
 
433
502
  # Assignment will remain in PENDING state if no active capacity commitment is
@@ -446,7 +515,8 @@ module Google
446
515
  end
447
516
  end
448
517
 
449
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment ReservationService.CreateAssignment}.
518
+ # The request for
519
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment ReservationService.CreateAssignment}.
450
520
  # Note: "bigquery.reservationAssignments.create" permission is required on the
451
521
  # related assignee.
452
522
  # @!attribute [rw] parent
@@ -467,7 +537,8 @@ module Google
467
537
  extend ::Google::Protobuf::MessageExts::ClassMethods
468
538
  end
469
539
 
470
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}.
540
+ # The request for
541
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}.
471
542
  # @!attribute [rw] parent
472
543
  # @return [::String]
473
544
  # Required. The parent resource name e.g.:
@@ -488,7 +559,8 @@ module Google
488
559
  extend ::Google::Protobuf::MessageExts::ClassMethods
489
560
  end
490
561
 
491
- # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}.
562
+ # The response for
563
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}.
492
564
  # @!attribute [rw] assignments
493
565
  # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
494
566
  # List of assignments visible to the user.
@@ -501,7 +573,8 @@ module Google
501
573
  extend ::Google::Protobuf::MessageExts::ClassMethods
502
574
  end
503
575
 
504
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment ReservationService.DeleteAssignment}.
576
+ # The request for
577
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment ReservationService.DeleteAssignment}.
505
578
  # Note: "bigquery.reservationAssignments.delete" permission is required on the
506
579
  # related assignee.
507
580
  # @!attribute [rw] name
@@ -519,8 +592,8 @@ module Google
519
592
  # related assignee.
520
593
  # @!attribute [rw] parent
521
594
  # @return [::String]
522
- # Required. The resource name of the admin project(containing project and location),
523
- # e.g.:
595
+ # Required. The resource name of the admin project(containing project and
596
+ # location), e.g.:
524
597
  # `projects/myproject/locations/US`.
525
598
  # @!attribute [rw] query
526
599
  # @return [::String]
@@ -548,8 +621,8 @@ module Google
548
621
  # related assignee.
549
622
  # @!attribute [rw] parent
550
623
  # @return [::String]
551
- # Required. The resource name with location (project name could be the wildcard '-'),
552
- # e.g.:
624
+ # Required. The resource name with location (project name could be the
625
+ # wildcard '-'), e.g.:
553
626
  # `projects/-/locations/US`.
554
627
  # @!attribute [rw] query
555
628
  # @return [::String]
@@ -571,7 +644,8 @@ module Google
571
644
  extend ::Google::Protobuf::MessageExts::ClassMethods
572
645
  end
573
646
 
574
- # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}.
647
+ # The response for
648
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}.
575
649
  # @!attribute [rw] assignments
576
650
  # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
577
651
  # List of assignments visible to the user.
@@ -584,7 +658,8 @@ module Google
584
658
  extend ::Google::Protobuf::MessageExts::ClassMethods
585
659
  end
586
660
 
587
- # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}.
661
+ # The response for
662
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}.
588
663
  # @!attribute [rw] assignments
589
664
  # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
590
665
  # List of assignments visible to the user.
@@ -615,12 +690,20 @@ module Google
615
690
  # @return [::String]
616
691
  # The new reservation ID, e.g.:
617
692
  # `projects/myotherproject/locations/US/reservations/team2-prod`
693
+ # @!attribute [rw] assignment_id
694
+ # @return [::String]
695
+ # The optional assignment ID. A new assignment name is generated if this
696
+ # field is empty.
697
+ #
698
+ # This field can contain only lowercase alphanumeric characters or dashes.
699
+ # Max length is 64 characters.
618
700
  class MoveAssignmentRequest
619
701
  include ::Google::Protobuf::MessageExts
620
702
  extend ::Google::Protobuf::MessageExts::ClassMethods
621
703
  end
622
704
 
623
- # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment ReservationService.UpdateAssignment}.
705
+ # The request for
706
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment ReservationService.UpdateAssignment}.
624
707
  # @!attribute [rw] assignment
625
708
  # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
626
709
  # Content of the assignment to update.
@@ -689,6 +772,23 @@ module Google
689
772
  include ::Google::Protobuf::MessageExts
690
773
  extend ::Google::Protobuf::MessageExts::ClassMethods
691
774
  end
775
+
776
+ # The type of editions.
777
+ # Different features and behaviors are provided to different editions
778
+ # Capacity commitments and reservations are linked to editions.
779
+ module Edition
780
+ # Default value, which will be treated as ENTERPRISE.
781
+ EDITION_UNSPECIFIED = 0
782
+
783
+ # Standard edition.
784
+ STANDARD = 1
785
+
786
+ # Enterprise edition.
787
+ ENTERPRISE = 2
788
+
789
+ # Enterprise plus edition.
790
+ ENTERPRISE_PLUS = 3
791
+ end
692
792
  end
693
793
  end
694
794
  end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Protobuf
22
+ # A Duration represents a signed, fixed-length span of time represented
23
+ # as a count of seconds and fractions of seconds at nanosecond
24
+ # resolution. It is independent of any calendar and concepts like "day"
25
+ # or "month". It is related to Timestamp in that the difference between
26
+ # two Timestamp values is a Duration and it can be added or subtracted
27
+ # from a Timestamp. Range is approximately +-10,000 years.
28
+ #
29
+ # # Examples
30
+ #
31
+ # Example 1: Compute Duration from two Timestamps in pseudo code.
32
+ #
33
+ # Timestamp start = ...;
34
+ # Timestamp end = ...;
35
+ # Duration duration = ...;
36
+ #
37
+ # duration.seconds = end.seconds - start.seconds;
38
+ # duration.nanos = end.nanos - start.nanos;
39
+ #
40
+ # if (duration.seconds < 0 && duration.nanos > 0) {
41
+ # duration.seconds += 1;
42
+ # duration.nanos -= 1000000000;
43
+ # } else if (duration.seconds > 0 && duration.nanos < 0) {
44
+ # duration.seconds -= 1;
45
+ # duration.nanos += 1000000000;
46
+ # }
47
+ #
48
+ # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
49
+ #
50
+ # Timestamp start = ...;
51
+ # Duration duration = ...;
52
+ # Timestamp end = ...;
53
+ #
54
+ # end.seconds = start.seconds + duration.seconds;
55
+ # end.nanos = start.nanos + duration.nanos;
56
+ #
57
+ # if (end.nanos < 0) {
58
+ # end.seconds -= 1;
59
+ # end.nanos += 1000000000;
60
+ # } else if (end.nanos >= 1000000000) {
61
+ # end.seconds += 1;
62
+ # end.nanos -= 1000000000;
63
+ # }
64
+ #
65
+ # Example 3: Compute Duration from datetime.timedelta in Python.
66
+ #
67
+ # td = datetime.timedelta(days=3, minutes=10)
68
+ # duration = Duration()
69
+ # duration.FromTimedelta(td)
70
+ #
71
+ # # JSON Mapping
72
+ #
73
+ # In JSON format, the Duration type is encoded as a string rather than an
74
+ # object, where the string ends in the suffix "s" (indicating seconds) and
75
+ # is preceded by the number of seconds, with nanoseconds expressed as
76
+ # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
77
+ # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
78
+ # be expressed in JSON format as "3.000000001s", and 3 seconds and 1
79
+ # microsecond should be expressed in JSON format as "3.000001s".
80
+ # @!attribute [rw] seconds
81
+ # @return [::Integer]
82
+ # Signed seconds of the span of time. Must be from -315,576,000,000
83
+ # to +315,576,000,000 inclusive. Note: these bounds are computed from:
84
+ # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
85
+ # @!attribute [rw] nanos
86
+ # @return [::Integer]
87
+ # Signed fractions of a second at nanosecond resolution of the span
88
+ # of time. Durations less than one second are represented with a 0
89
+ # `seconds` field and a positive or negative `nanos` field. For durations
90
+ # of one second or more, a non-zero value for the `nanos` field must be
91
+ # of the same sign as the `seconds` field. Must be from -999,999,999
92
+ # to +999,999,999 inclusive.
93
+ class Duration
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+ end
98
+ end
@@ -26,8 +26,6 @@ module Google
26
26
  # service Foo {
27
27
  # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
28
  # }
29
- #
30
- # The JSON representation for `Empty` is empty JSON object `{}`.
31
29
  class Empty
32
30
  include ::Google::Protobuf::MessageExts
33
31
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -28,12 +28,14 @@ module Google
28
28
  # [API Design Guide](https://cloud.google.com/apis/design/errors).
29
29
  # @!attribute [rw] code
30
30
  # @return [::Integer]
31
- # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
31
+ # The status code, which should be an enum value of
32
+ # [google.rpc.Code][google.rpc.Code].
32
33
  # @!attribute [rw] message
33
34
  # @return [::String]
34
35
  # A developer-facing error message, which should be in English. Any
35
36
  # user-facing error message should be localized and sent in the
36
- # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized by the client.
37
+ # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized
38
+ # by the client.
37
39
  # @!attribute [rw] details
38
40
  # @return [::Array<::Google::Protobuf::Any>]
39
41
  # A list of messages that carry the error details. There is a common set of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery-reservation-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-01 00:00:00.000000000 Z
11
+ date: 2023-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.10'
19
+ version: 0.18.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.10'
29
+ version: 0.18.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.26.1
53
+ version: 1.26.3
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.26.1
60
+ version: 1.26.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -177,13 +177,20 @@ files:
177
177
  - lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb
178
178
  - lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb
179
179
  - lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb
180
+ - lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb
181
+ - lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb
182
+ - lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb
180
183
  - lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb
184
+ - lib/google/cloud/bigquery/reservation/v1/rest.rb
181
185
  - lib/google/cloud/bigquery/reservation/v1/version.rb
182
186
  - proto_docs/README.md
187
+ - proto_docs/google/api/client.rb
183
188
  - proto_docs/google/api/field_behavior.rb
189
+ - proto_docs/google/api/launch_stage.rb
184
190
  - proto_docs/google/api/resource.rb
185
191
  - proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb
186
192
  - proto_docs/google/protobuf/any.rb
193
+ - proto_docs/google/protobuf/duration.rb
187
194
  - proto_docs/google/protobuf/empty.rb
188
195
  - proto_docs/google/protobuf/field_mask.rb
189
196
  - proto_docs/google/protobuf/timestamp.rb
@@ -207,8 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
214
  - !ruby/object:Gem::Version
208
215
  version: '0'
209
216
  requirements: []
210
- rubygems_version: 3.3.14
217
+ rubygems_version: 3.4.2
211
218
  signing_key:
212
219
  specification_version: 4
213
- summary: API Client library for the BigQuery Reservation V1 API
220
+ summary: A service to modify your BigQuery flat-rate reservations.
214
221
  test_files: []