google-cloud-bigquery-reservation-v1 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b63379d442bda714035cf5cfd8de425907860ab7e4a33eebcc7396d9e1fde47
4
- data.tar.gz: 2be0216ab198bcb29535523605621fbe02c3e9b21697fc79630fc1a8ec828c36
3
+ metadata.gz: f40ed2d914c5c6cbe86653c0b5be4d2dfceea516b00399a456de06d4fa4267db
4
+ data.tar.gz: 7e65142bac2c1705cad029bb7725e71ac6e51f8a65f9e4a09c42f208dcfc5a2d
5
5
  SHA512:
6
- metadata.gz: c782ff859989b6e22b886872edd0fb34a6e24b0833fbaa12a620769bb46a953b5632fb603cdb1964ee2bf78abbbd41bdc8ea55c054f1c71c5992d3e5169d00d6
7
- data.tar.gz: f13b29f6bffc148f09edfaeb5bedfae491cee65e6e64e47fdf46686c6c8b91b955db14a113c3eb712968687aeb93f98648fcd322c87b40cc0f330000f6c42ea4
6
+ metadata.gz: 0f98d554bd713ed30bf7f99079ff295b552708dd03846257b389a3805f4fbed5e470369b6fc4d9e9cf3d5ab35b3b6a2a6ba540fb1d5c98c38ff2687eba378612
7
+ data.tar.gz: 4b742a4c8b70b16e3d8754456d26d9ac42d37a024dbabe274a421382d45f388ac2a93e83716efd7c8065a6c5c258f96aa0042f945305ec92a34d26095bbb7d16
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-bigquery-reservation-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Credentials}):
68
68
 
69
- 1. `BIGQUERY_RESERVATION_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `BIGQUERY_RESERVATION_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `BIGQUERY_RESERVATION_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `BIGQUERY_RESERVATION_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/bigquery/reservation/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/bigquery/reservation/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/bigquery/reservation/v1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/bigquery/reservation/v1"
34
34
 
35
35
  client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new # (request fields as keyword arguments...)
37
37
  response = client.create_reservation request
38
38
  ```
39
39
 
@@ -17,12 +17,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  optional :name, :string, 1
18
18
  optional :slot_capacity, :int64, 2
19
19
  optional :ignore_idle_slots, :bool, 4
20
+ optional :creation_time, :message, 8, "google.protobuf.Timestamp"
21
+ optional :update_time, :message, 9, "google.protobuf.Timestamp"
20
22
  end
21
23
  add_message "google.cloud.bigquery.reservation.v1.CapacityCommitment" do
22
24
  optional :name, :string, 1
23
25
  optional :slot_count, :int64, 2
24
26
  optional :plan, :enum, 3, "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan"
25
27
  optional :state, :enum, 4, "google.cloud.bigquery.reservation.v1.CapacityCommitment.State"
28
+ optional :commitment_start_time, :message, 9, "google.protobuf.Timestamp"
26
29
  optional :commitment_end_time, :message, 5, "google.protobuf.Timestamp"
27
30
  optional :failure_status, :message, 7, "google.rpc.Status"
28
31
  optional :renewal_plan, :enum, 8, "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan"
@@ -68,6 +71,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
68
71
  optional :parent, :string, 1
69
72
  optional :capacity_commitment, :message, 2, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
70
73
  optional :enforce_single_admin_project_per_org, :bool, 4
74
+ optional :capacity_commitment_id, :string, 5
71
75
  end
72
76
  add_message "google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest" do
73
77
  optional :parent, :string, 1
@@ -83,6 +87,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
83
87
  end
84
88
  add_message "google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest" do
85
89
  optional :name, :string, 1
90
+ optional :force, :bool, 3
86
91
  end
87
92
  add_message "google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest" do
88
93
  optional :capacity_commitment, :message, 1, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
@@ -110,6 +115,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
110
115
  value :JOB_TYPE_UNSPECIFIED, 0
111
116
  value :PIPELINE, 1
112
117
  value :QUERY, 2
118
+ value :ML_EXTERNAL, 3
113
119
  end
114
120
  add_enum "google.cloud.bigquery.reservation.v1.Assignment.State" do
115
121
  value :STATE_UNSPECIFIED, 0
@@ -119,6 +125,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
119
125
  add_message "google.cloud.bigquery.reservation.v1.CreateAssignmentRequest" do
120
126
  optional :parent, :string, 1
121
127
  optional :assignment, :message, 2, "google.cloud.bigquery.reservation.v1.Assignment"
128
+ optional :assignment_id, :string, 4
122
129
  end
123
130
  add_message "google.cloud.bigquery.reservation.v1.ListAssignmentsRequest" do
124
131
  optional :parent, :string, 1
@@ -138,10 +145,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
138
145
  optional :page_size, :int32, 3
139
146
  optional :page_token, :string, 4
140
147
  end
148
+ add_message "google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest" do
149
+ optional :parent, :string, 1
150
+ optional :query, :string, 2
151
+ optional :page_size, :int32, 3
152
+ optional :page_token, :string, 4
153
+ end
141
154
  add_message "google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse" do
142
155
  repeated :assignments, :message, 1, "google.cloud.bigquery.reservation.v1.Assignment"
143
156
  optional :next_page_token, :string, 2
144
157
  end
158
+ add_message "google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse" do
159
+ repeated :assignments, :message, 1, "google.cloud.bigquery.reservation.v1.Assignment"
160
+ optional :next_page_token, :string, 2
161
+ end
145
162
  add_message "google.cloud.bigquery.reservation.v1.MoveAssignmentRequest" do
146
163
  optional :name, :string, 1
147
164
  optional :destination_id, :string, 3
@@ -193,7 +210,9 @@ module Google
193
210
  ListAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsResponse").msgclass
194
211
  DeleteAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest").msgclass
195
212
  SearchAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest").msgclass
213
+ SearchAllAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest").msgclass
196
214
  SearchAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse").msgclass
215
+ SearchAllAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse").msgclass
197
216
  MoveAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MoveAssignmentRequest").msgclass
198
217
  BiReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.BiReservation").msgclass
199
218
  GetBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetBiReservationRequest").msgclass
@@ -56,13 +56,12 @@ module Google
56
56
  # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration}
57
57
  # for a description of the configuration fields.
58
58
  #
59
- # ## Example
59
+ # @example
60
60
  #
61
- # To modify the configuration for all ReservationService clients:
62
- #
63
- # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config|
64
- # config.timeout = 10.0
65
- # end
61
+ # # Modify the configuration for all ReservationService clients
62
+ # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config|
63
+ # config.timeout = 10.0
64
+ # end
66
65
  #
67
66
  # @yield [config] Configure the Client client.
68
67
  # @yieldparam config [Client::Configuration]
@@ -80,103 +79,73 @@ module Google
80
79
  end
81
80
  default_config = Client::Configuration.new parent_config
82
81
 
83
- default_config.rpcs.create_reservation.timeout = 60.0
82
+ default_config.rpcs.create_reservation.timeout = 300.0
84
83
 
85
84
  default_config.rpcs.list_reservations.timeout = 60.0
86
85
  default_config.rpcs.list_reservations.retry_policy = {
87
- initial_delay: 0.1,
88
- max_delay: 60.0,
89
- multiplier: 1.3,
90
- retry_codes: [4, 14]
86
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
91
87
  }
92
88
 
93
89
  default_config.rpcs.get_reservation.timeout = 60.0
94
90
  default_config.rpcs.get_reservation.retry_policy = {
95
- initial_delay: 0.1,
96
- max_delay: 60.0,
97
- multiplier: 1.3,
98
- retry_codes: [4, 14]
91
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
99
92
  }
100
93
 
101
94
  default_config.rpcs.delete_reservation.timeout = 60.0
102
95
  default_config.rpcs.delete_reservation.retry_policy = {
103
- initial_delay: 0.1,
104
- max_delay: 60.0,
105
- multiplier: 1.3,
106
- retry_codes: [4, 14]
96
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
107
97
  }
108
98
 
109
- default_config.rpcs.update_reservation.timeout = 60.0
99
+ default_config.rpcs.update_reservation.timeout = 300.0
110
100
 
111
- default_config.rpcs.create_capacity_commitment.timeout = 60.0
101
+ default_config.rpcs.create_capacity_commitment.timeout = 300.0
112
102
 
113
103
  default_config.rpcs.list_capacity_commitments.timeout = 60.0
114
104
  default_config.rpcs.list_capacity_commitments.retry_policy = {
115
- initial_delay: 0.1,
116
- max_delay: 60.0,
117
- multiplier: 1.3,
118
- retry_codes: [4, 14]
105
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
119
106
  }
120
107
 
121
108
  default_config.rpcs.get_capacity_commitment.timeout = 60.0
122
109
  default_config.rpcs.get_capacity_commitment.retry_policy = {
123
- initial_delay: 0.1,
124
- max_delay: 60.0,
125
- multiplier: 1.3,
126
- retry_codes: [4, 14]
110
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
127
111
  }
128
112
 
129
113
  default_config.rpcs.delete_capacity_commitment.timeout = 60.0
130
114
  default_config.rpcs.delete_capacity_commitment.retry_policy = {
131
- initial_delay: 0.1,
132
- max_delay: 60.0,
133
- multiplier: 1.3,
134
- retry_codes: [4, 14]
115
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
135
116
  }
136
117
 
137
- default_config.rpcs.update_capacity_commitment.timeout = 60.0
118
+ default_config.rpcs.update_capacity_commitment.timeout = 300.0
138
119
 
139
- default_config.rpcs.split_capacity_commitment.timeout = 60.0
120
+ default_config.rpcs.split_capacity_commitment.timeout = 300.0
140
121
 
141
- default_config.rpcs.merge_capacity_commitments.timeout = 60.0
122
+ default_config.rpcs.merge_capacity_commitments.timeout = 300.0
142
123
 
143
- default_config.rpcs.create_assignment.timeout = 60.0
124
+ default_config.rpcs.create_assignment.timeout = 300.0
144
125
 
145
126
  default_config.rpcs.list_assignments.timeout = 60.0
146
127
  default_config.rpcs.list_assignments.retry_policy = {
147
- initial_delay: 0.1,
148
- max_delay: 60.0,
149
- multiplier: 1.3,
150
- retry_codes: [4, 14]
128
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
151
129
  }
152
130
 
153
131
  default_config.rpcs.delete_assignment.timeout = 60.0
154
132
  default_config.rpcs.delete_assignment.retry_policy = {
155
- initial_delay: 0.1,
156
- max_delay: 60.0,
157
- multiplier: 1.3,
158
- retry_codes: [4, 14]
133
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
159
134
  }
160
135
 
161
136
  default_config.rpcs.search_assignments.timeout = 60.0
162
137
  default_config.rpcs.search_assignments.retry_policy = {
163
- initial_delay: 0.1,
164
- max_delay: 60.0,
165
- multiplier: 1.3,
166
- retry_codes: [4, 14]
138
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
167
139
  }
168
140
 
169
- default_config.rpcs.move_assignment.timeout = 60.0
141
+ default_config.rpcs.move_assignment.timeout = 300.0
170
142
 
171
143
  default_config.rpcs.get_bi_reservation.timeout = 60.0
172
144
  default_config.rpcs.get_bi_reservation.retry_policy = {
173
- initial_delay: 0.1,
174
- max_delay: 60.0,
175
- multiplier: 1.3,
176
- retry_codes: [4, 14]
145
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
177
146
  }
178
147
 
179
- default_config.rpcs.update_bi_reservation.timeout = 60.0
148
+ default_config.rpcs.update_bi_reservation.timeout = 300.0
180
149
 
181
150
  default_config
182
151
  end
@@ -207,19 +176,15 @@ module Google
207
176
  ##
208
177
  # Create a new ReservationService client object.
209
178
  #
210
- # ## Examples
211
- #
212
- # To create a new ReservationService client with the default
213
- # configuration:
179
+ # @example
214
180
  #
215
- # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
181
+ # # Create a client using the default configuration
182
+ # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
216
183
  #
217
- # To create a new ReservationService client with a custom
218
- # configuration:
219
- #
220
- # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config|
221
- # config.timeout = 10.0
222
- # end
184
+ # # Create a client using a custom configuration
185
+ # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config|
186
+ # config.timeout = 10.0
187
+ # end
223
188
  #
224
189
  # @yield [config] Configure the ReservationService client.
225
190
  # @yieldparam config [Client::Configuration]
@@ -239,14 +204,13 @@ module Google
239
204
 
240
205
  # Create credentials
241
206
  credentials = @config.credentials
242
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
207
+ # Use self-signed JWT if the endpoint is unchanged from default,
243
208
  # but only if the default endpoint does not have a region prefix.
244
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
245
- @config.endpoint == Client.configure.endpoint &&
209
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
246
210
  !@config.endpoint.split(".").first.include?("-")
247
211
  credentials ||= Credentials.default scope: @config.scope,
248
212
  enable_self_signed_jwt: enable_self_signed_jwt
249
- if credentials.is_a?(String) || credentials.is_a?(Hash)
213
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
250
214
  credentials = Credentials.new credentials, scope: @config.scope
251
215
  end
252
216
  @quota_project_id = @config.quota_project
@@ -324,7 +288,9 @@ module Google
324
288
  options.apply_defaults timeout: @config.rpcs.create_reservation.timeout,
325
289
  metadata: metadata,
326
290
  retry_policy: @config.rpcs.create_reservation.retry_policy
327
- options.apply_defaults metadata: @config.metadata,
291
+
292
+ options.apply_defaults timeout: @config.timeout,
293
+ metadata: @config.metadata,
328
294
  retry_policy: @config.retry_policy
329
295
 
330
296
  @reservation_service_stub.call_rpc :create_reservation, request, options: options do |response, operation|
@@ -395,7 +361,9 @@ module Google
395
361
  options.apply_defaults timeout: @config.rpcs.list_reservations.timeout,
396
362
  metadata: metadata,
397
363
  retry_policy: @config.rpcs.list_reservations.retry_policy
398
- options.apply_defaults metadata: @config.metadata,
364
+
365
+ options.apply_defaults timeout: @config.timeout,
366
+ metadata: @config.metadata,
399
367
  retry_policy: @config.retry_policy
400
368
 
401
369
  @reservation_service_stub.call_rpc :list_reservations, request, options: options do |response, operation|
@@ -463,7 +431,9 @@ module Google
463
431
  options.apply_defaults timeout: @config.rpcs.get_reservation.timeout,
464
432
  metadata: metadata,
465
433
  retry_policy: @config.rpcs.get_reservation.retry_policy
466
- options.apply_defaults metadata: @config.metadata,
434
+
435
+ options.apply_defaults timeout: @config.timeout,
436
+ metadata: @config.metadata,
467
437
  retry_policy: @config.retry_policy
468
438
 
469
439
  @reservation_service_stub.call_rpc :get_reservation, request, options: options do |response, operation|
@@ -532,7 +502,9 @@ module Google
532
502
  options.apply_defaults timeout: @config.rpcs.delete_reservation.timeout,
533
503
  metadata: metadata,
534
504
  retry_policy: @config.rpcs.delete_reservation.retry_policy
535
- options.apply_defaults metadata: @config.metadata,
505
+
506
+ options.apply_defaults timeout: @config.timeout,
507
+ metadata: @config.metadata,
536
508
  retry_policy: @config.retry_policy
537
509
 
538
510
  @reservation_service_stub.call_rpc :delete_reservation, request, options: options do |response, operation|
@@ -600,7 +572,9 @@ module Google
600
572
  options.apply_defaults timeout: @config.rpcs.update_reservation.timeout,
601
573
  metadata: metadata,
602
574
  retry_policy: @config.rpcs.update_reservation.retry_policy
603
- options.apply_defaults metadata: @config.metadata,
575
+
576
+ options.apply_defaults timeout: @config.timeout,
577
+ metadata: @config.metadata,
604
578
  retry_policy: @config.retry_policy
605
579
 
606
580
  @reservation_service_stub.call_rpc :update_reservation, request, options: options do |response, operation|
@@ -624,7 +598,7 @@ module Google
624
598
  # @param options [::Gapic::CallOptions, ::Hash]
625
599
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
626
600
  #
627
- # @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil)
601
+ # @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil)
628
602
  # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at
629
603
  # least one keyword argument is required. To specify no parameters, or to keep all
630
604
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -637,6 +611,12 @@ module Google
637
611
  # @param enforce_single_admin_project_per_org [::Boolean]
638
612
  # If true, fail the request if another project in the organization has a
639
613
  # capacity commitment.
614
+ # @param capacity_commitment_id [::String]
615
+ # The optional capacity commitment ID. Capacity commitment name will be
616
+ # generated automatically if this field is empty.
617
+ # This field must only contain lower case alphanumeric characters or dash.
618
+ # Max length is 64 characters.
619
+ # NOTE: this ID won't be kept if the capacity commitment is split or merged.
640
620
  #
641
621
  # @yield [response, operation] Access the result along with the RPC operation
642
622
  # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
@@ -672,7 +652,9 @@ module Google
672
652
  options.apply_defaults timeout: @config.rpcs.create_capacity_commitment.timeout,
673
653
  metadata: metadata,
674
654
  retry_policy: @config.rpcs.create_capacity_commitment.retry_policy
675
- options.apply_defaults metadata: @config.metadata,
655
+
656
+ options.apply_defaults timeout: @config.timeout,
657
+ metadata: @config.metadata,
676
658
  retry_policy: @config.retry_policy
677
659
 
678
660
  @reservation_service_stub.call_rpc :create_capacity_commitment, request, options: options do |response, operation|
@@ -743,7 +725,9 @@ module Google
743
725
  options.apply_defaults timeout: @config.rpcs.list_capacity_commitments.timeout,
744
726
  metadata: metadata,
745
727
  retry_policy: @config.rpcs.list_capacity_commitments.retry_policy
746
- options.apply_defaults metadata: @config.metadata,
728
+
729
+ options.apply_defaults timeout: @config.timeout,
730
+ metadata: @config.metadata,
747
731
  retry_policy: @config.retry_policy
748
732
 
749
733
  @reservation_service_stub.call_rpc :list_capacity_commitments, request, options: options do |response, operation|
@@ -811,7 +795,9 @@ module Google
811
795
  options.apply_defaults timeout: @config.rpcs.get_capacity_commitment.timeout,
812
796
  metadata: metadata,
813
797
  retry_policy: @config.rpcs.get_capacity_commitment.retry_policy
814
- options.apply_defaults metadata: @config.metadata,
798
+
799
+ options.apply_defaults timeout: @config.timeout,
800
+ metadata: @config.metadata,
815
801
  retry_policy: @config.retry_policy
816
802
 
817
803
  @reservation_service_stub.call_rpc :get_capacity_commitment, request, options: options do |response, operation|
@@ -837,7 +823,7 @@ module Google
837
823
  # @param options [::Gapic::CallOptions, ::Hash]
838
824
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
839
825
  #
840
- # @overload delete_capacity_commitment(name: nil)
826
+ # @overload delete_capacity_commitment(name: nil, force: nil)
841
827
  # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at
842
828
  # least one keyword argument is required. To specify no parameters, or to keep all
843
829
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -845,6 +831,10 @@ module Google
845
831
  # @param name [::String]
846
832
  # Required. Resource name of the capacity commitment to delete. E.g.,
847
833
  # `projects/myproject/locations/US/capacityCommitments/123`
834
+ # @param force [::Boolean]
835
+ # Can be used to force delete commitments even if assignments exist. Deleting
836
+ # commitments with assignments may cause queries to fail if they no longer
837
+ # have access to slots.
848
838
  #
849
839
  # @yield [response, operation] Access the result along with the RPC operation
850
840
  # @yieldparam response [::Google::Protobuf::Empty]
@@ -880,7 +870,9 @@ module Google
880
870
  options.apply_defaults timeout: @config.rpcs.delete_capacity_commitment.timeout,
881
871
  metadata: metadata,
882
872
  retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy
883
- options.apply_defaults metadata: @config.metadata,
873
+
874
+ options.apply_defaults timeout: @config.timeout,
875
+ metadata: @config.metadata,
884
876
  retry_policy: @config.retry_policy
885
877
 
886
878
  @reservation_service_stub.call_rpc :delete_capacity_commitment, request, options: options do |response, operation|
@@ -954,7 +946,9 @@ module Google
954
946
  options.apply_defaults timeout: @config.rpcs.update_capacity_commitment.timeout,
955
947
  metadata: metadata,
956
948
  retry_policy: @config.rpcs.update_capacity_commitment.retry_policy
957
- options.apply_defaults metadata: @config.metadata,
949
+
950
+ options.apply_defaults timeout: @config.timeout,
951
+ metadata: @config.metadata,
958
952
  retry_policy: @config.retry_policy
959
953
 
960
954
  @reservation_service_stub.call_rpc :update_capacity_commitment, request, options: options do |response, operation|
@@ -1030,7 +1024,9 @@ module Google
1030
1024
  options.apply_defaults timeout: @config.rpcs.split_capacity_commitment.timeout,
1031
1025
  metadata: metadata,
1032
1026
  retry_policy: @config.rpcs.split_capacity_commitment.retry_policy
1033
- options.apply_defaults metadata: @config.metadata,
1027
+
1028
+ options.apply_defaults timeout: @config.timeout,
1029
+ metadata: @config.metadata,
1034
1030
  retry_policy: @config.retry_policy
1035
1031
 
1036
1032
  @reservation_service_stub.call_rpc :split_capacity_commitment, request, options: options do |response, operation|
@@ -1109,7 +1105,9 @@ module Google
1109
1105
  options.apply_defaults timeout: @config.rpcs.merge_capacity_commitments.timeout,
1110
1106
  metadata: metadata,
1111
1107
  retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy
1112
- options.apply_defaults metadata: @config.metadata,
1108
+
1109
+ options.apply_defaults timeout: @config.timeout,
1110
+ metadata: @config.metadata,
1113
1111
  retry_policy: @config.retry_policy
1114
1112
 
1115
1113
  @reservation_service_stub.call_rpc :merge_capacity_commitments, request, options: options do |response, operation|
@@ -1145,6 +1143,11 @@ module Google
1145
1143
  # `project2`) could all be created and mapped to the same or different
1146
1144
  # reservations.
1147
1145
  #
1146
+ # "None" assignments represent an absence of the assignment. Projects
1147
+ # assigned to None use on-demand pricing. To create a "None" assignment, use
1148
+ # "none" as a reservation_id in the parent. Example parent:
1149
+ # `projects/myproject/locations/US/reservations/none`.
1150
+ #
1148
1151
  # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
1149
1152
  # 'bigquery.admin' permissions on the project using the reservation
1150
1153
  # and the project that owns this reservation.
@@ -1162,7 +1165,7 @@ module Google
1162
1165
  # @param options [::Gapic::CallOptions, ::Hash]
1163
1166
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1164
1167
  #
1165
- # @overload create_assignment(parent: nil, assignment: nil)
1168
+ # @overload create_assignment(parent: nil, assignment: nil, assignment_id: nil)
1166
1169
  # Pass arguments to `create_assignment` via keyword arguments. Note that at
1167
1170
  # least one keyword argument is required. To specify no parameters, or to keep all
1168
1171
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1172,6 +1175,11 @@ module Google
1172
1175
  # E.g. `projects/myproject/locations/US/reservations/team1-prod`
1173
1176
  # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash]
1174
1177
  # Assignment resource to create.
1178
+ # @param assignment_id [::String]
1179
+ # The optional assignment ID. Assignment name will be generated automatically
1180
+ # if this field is empty.
1181
+ # This field must only contain lower case alphanumeric characters or dash.
1182
+ # Max length is 64 characters.
1175
1183
  #
1176
1184
  # @yield [response, operation] Access the result along with the RPC operation
1177
1185
  # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
@@ -1207,7 +1215,9 @@ module Google
1207
1215
  options.apply_defaults timeout: @config.rpcs.create_assignment.timeout,
1208
1216
  metadata: metadata,
1209
1217
  retry_policy: @config.rpcs.create_assignment.retry_policy
1210
- options.apply_defaults metadata: @config.metadata,
1218
+
1219
+ options.apply_defaults timeout: @config.timeout,
1220
+ metadata: @config.metadata,
1211
1221
  retry_policy: @config.retry_policy
1212
1222
 
1213
1223
  @reservation_service_stub.call_rpc :create_assignment, request, options: options do |response, operation|
@@ -1303,7 +1313,9 @@ module Google
1303
1313
  options.apply_defaults timeout: @config.rpcs.list_assignments.timeout,
1304
1314
  metadata: metadata,
1305
1315
  retry_policy: @config.rpcs.list_assignments.retry_policy
1306
- options.apply_defaults metadata: @config.metadata,
1316
+
1317
+ options.apply_defaults timeout: @config.timeout,
1318
+ metadata: @config.metadata,
1307
1319
  retry_policy: @config.retry_policy
1308
1320
 
1309
1321
  @reservation_service_stub.call_rpc :list_assignments, request, options: options do |response, operation|
@@ -1385,7 +1397,9 @@ module Google
1385
1397
  options.apply_defaults timeout: @config.rpcs.delete_assignment.timeout,
1386
1398
  metadata: metadata,
1387
1399
  retry_policy: @config.rpcs.delete_assignment.retry_policy
1388
- options.apply_defaults metadata: @config.metadata,
1400
+
1401
+ options.apply_defaults timeout: @config.timeout,
1402
+ metadata: @config.metadata,
1389
1403
  retry_policy: @config.retry_policy
1390
1404
 
1391
1405
  @reservation_service_stub.call_rpc :delete_assignment, request, options: options do |response, operation|
@@ -1397,7 +1411,7 @@ module Google
1397
1411
  end
1398
1412
 
1399
1413
  ##
1400
- # Looks up assignments for a specified resource for a particular region.
1414
+ # Deprecated: Looks up assignments for a specified resource for a particular region.
1401
1415
  # If the request is about a project:
1402
1416
  #
1403
1417
  # 1. Assignments created on the project will be returned if they exist.
@@ -1421,6 +1435,8 @@ module Google
1421
1435
  # **Note** "-" cannot be used for projects
1422
1436
  # nor locations.
1423
1437
  #
1438
+ # @deprecated This method is deprecated and may be removed in the next major version update.
1439
+ #
1424
1440
  # @overload search_assignments(request, options = nil)
1425
1441
  # Pass arguments to `search_assignments` via a request object, either of type
1426
1442
  # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash.
@@ -1487,7 +1503,9 @@ module Google
1487
1503
  options.apply_defaults timeout: @config.rpcs.search_assignments.timeout,
1488
1504
  metadata: metadata,
1489
1505
  retry_policy: @config.rpcs.search_assignments.retry_policy
1490
- options.apply_defaults metadata: @config.metadata,
1506
+
1507
+ options.apply_defaults timeout: @config.timeout,
1508
+ metadata: @config.metadata,
1491
1509
  retry_policy: @config.retry_policy
1492
1510
 
1493
1511
  @reservation_service_stub.call_rpc :search_assignments, request, options: options do |response, operation|
@@ -1499,6 +1517,108 @@ module Google
1499
1517
  raise ::Google::Cloud::Error.from_error(e)
1500
1518
  end
1501
1519
 
1520
+ ##
1521
+ # Looks up assignments for a specified resource for a particular region.
1522
+ # If the request is about a project:
1523
+ #
1524
+ # 1. Assignments created on the project will be returned if they exist.
1525
+ # 2. Otherwise assignments created on the closest ancestor will be
1526
+ # returned.
1527
+ # 3. Assignments for different JobTypes will all be returned.
1528
+ #
1529
+ # The same logic applies if the request is about a folder.
1530
+ #
1531
+ # If the request is about an organization, then assignments created on the
1532
+ # organization will be returned (organization doesn't have ancestors).
1533
+ #
1534
+ # Comparing to ListAssignments, there are some behavior
1535
+ # differences:
1536
+ #
1537
+ # 1. permission on the assignee will be verified in this API.
1538
+ # 2. Hierarchy lookup (project->folder->organization) happens in this API.
1539
+ # 3. Parent here is `projects/*/locations/*`, instead of
1540
+ # `projects/*/locations/*reservations/*`.
1541
+ #
1542
+ # @overload search_all_assignments(request, options = nil)
1543
+ # Pass arguments to `search_all_assignments` via a request object, either of type
1544
+ # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash.
1545
+ #
1546
+ # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash]
1547
+ # A request object representing the call parameters. Required. To specify no
1548
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1549
+ # @param options [::Gapic::CallOptions, ::Hash]
1550
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1551
+ #
1552
+ # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil)
1553
+ # Pass arguments to `search_all_assignments` via keyword arguments. Note that at
1554
+ # least one keyword argument is required. To specify no parameters, or to keep all
1555
+ # the default parameter values, pass an empty Hash as a request object (see above).
1556
+ #
1557
+ # @param parent [::String]
1558
+ # Required. The resource name with location (project name could be the wildcard '-'),
1559
+ # e.g.:
1560
+ # `projects/-/locations/US`.
1561
+ # @param query [::String]
1562
+ # Please specify resource name as assignee in the query.
1563
+ #
1564
+ # Examples:
1565
+ #
1566
+ # * `assignee=projects/myproject`
1567
+ # * `assignee=folders/123`
1568
+ # * `assignee=organizations/456`
1569
+ # @param page_size [::Integer]
1570
+ # The maximum number of items to return per page.
1571
+ # @param page_token [::String]
1572
+ # The next_page_token value returned from a previous List request, if any.
1573
+ #
1574
+ # @yield [response, operation] Access the result along with the RPC operation
1575
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
1576
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1577
+ #
1578
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
1579
+ #
1580
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1581
+ #
1582
+ def search_all_assignments request, options = nil
1583
+ raise ::ArgumentError, "request must be provided" if request.nil?
1584
+
1585
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest
1586
+
1587
+ # Converts hash and nil to an options object
1588
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1589
+
1590
+ # Customize the options with defaults
1591
+ metadata = @config.rpcs.search_all_assignments.metadata.to_h
1592
+
1593
+ # Set x-goog-api-client and x-goog-user-project headers
1594
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1595
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1596
+ gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1597
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1598
+
1599
+ header_params = {
1600
+ "parent" => request.parent
1601
+ }
1602
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1603
+ metadata[:"x-goog-request-params"] ||= request_params_header
1604
+
1605
+ options.apply_defaults timeout: @config.rpcs.search_all_assignments.timeout,
1606
+ metadata: metadata,
1607
+ retry_policy: @config.rpcs.search_all_assignments.retry_policy
1608
+
1609
+ options.apply_defaults timeout: @config.timeout,
1610
+ metadata: @config.metadata,
1611
+ retry_policy: @config.retry_policy
1612
+
1613
+ @reservation_service_stub.call_rpc :search_all_assignments, request, options: options do |response, operation|
1614
+ response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, request, response, operation, options
1615
+ yield response, operation if block_given?
1616
+ return response
1617
+ end
1618
+ rescue ::GRPC::BadStatus => e
1619
+ raise ::Google::Cloud::Error.from_error(e)
1620
+ end
1621
+
1502
1622
  ##
1503
1623
  # Moves an assignment under a new reservation.
1504
1624
  #
@@ -1563,7 +1683,9 @@ module Google
1563
1683
  options.apply_defaults timeout: @config.rpcs.move_assignment.timeout,
1564
1684
  metadata: metadata,
1565
1685
  retry_policy: @config.rpcs.move_assignment.retry_policy
1566
- options.apply_defaults metadata: @config.metadata,
1686
+
1687
+ options.apply_defaults timeout: @config.timeout,
1688
+ metadata: @config.metadata,
1567
1689
  retry_policy: @config.retry_policy
1568
1690
 
1569
1691
  @reservation_service_stub.call_rpc :move_assignment, request, options: options do |response, operation|
@@ -1594,7 +1716,7 @@ module Google
1594
1716
  #
1595
1717
  # @param name [::String]
1596
1718
  # Required. Name of the requested reservation, for example:
1597
- # `projects/{project_id}/locations/{location_id}/bireservation`
1719
+ # `projects/{project_id}/locations/{location_id}/biReservation`
1598
1720
  #
1599
1721
  # @yield [response, operation] Access the result along with the RPC operation
1600
1722
  # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation]
@@ -1630,7 +1752,9 @@ module Google
1630
1752
  options.apply_defaults timeout: @config.rpcs.get_bi_reservation.timeout,
1631
1753
  metadata: metadata,
1632
1754
  retry_policy: @config.rpcs.get_bi_reservation.retry_policy
1633
- options.apply_defaults metadata: @config.metadata,
1755
+
1756
+ options.apply_defaults timeout: @config.timeout,
1757
+ metadata: @config.metadata,
1634
1758
  retry_policy: @config.retry_policy
1635
1759
 
1636
1760
  @reservation_service_stub.call_rpc :get_bi_reservation, request, options: options do |response, operation|
@@ -1705,7 +1829,9 @@ module Google
1705
1829
  options.apply_defaults timeout: @config.rpcs.update_bi_reservation.timeout,
1706
1830
  metadata: metadata,
1707
1831
  retry_policy: @config.rpcs.update_bi_reservation.retry_policy
1708
- options.apply_defaults metadata: @config.metadata,
1832
+
1833
+ options.apply_defaults timeout: @config.timeout,
1834
+ metadata: @config.metadata,
1709
1835
  retry_policy: @config.retry_policy
1710
1836
 
1711
1837
  @reservation_service_stub.call_rpc :update_bi_reservation, request, options: options do |response, operation|
@@ -1729,22 +1855,21 @@ module Google
1729
1855
  # Configuration can be applied globally to all clients, or to a single client
1730
1856
  # on construction.
1731
1857
  #
1732
- # # Examples
1733
- #
1734
- # To modify the global config, setting the timeout for create_reservation
1735
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1736
- #
1737
- # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config|
1738
- # config.timeout = 10.0
1739
- # config.rpcs.create_reservation.timeout = 20.0
1740
- # end
1858
+ # @example
1741
1859
  #
1742
- # To apply the above configuration only to a new client:
1860
+ # # Modify the global config, setting the timeout for
1861
+ # # create_reservation to 20 seconds,
1862
+ # # and all remaining timeouts to 10 seconds.
1863
+ # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config|
1864
+ # config.timeout = 10.0
1865
+ # config.rpcs.create_reservation.timeout = 20.0
1866
+ # end
1743
1867
  #
1744
- # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config|
1745
- # config.timeout = 10.0
1746
- # config.rpcs.create_reservation.timeout = 20.0
1747
- # end
1868
+ # # Apply the above configuration only to a new client.
1869
+ # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config|
1870
+ # config.timeout = 10.0
1871
+ # config.rpcs.create_reservation.timeout = 20.0
1872
+ # end
1748
1873
  #
1749
1874
  # @!attribute [rw] endpoint
1750
1875
  # The hostname or hostname:port of the service endpoint.
@@ -1933,6 +2058,11 @@ module Google
1933
2058
  #
1934
2059
  attr_reader :search_assignments
1935
2060
  ##
2061
+ # RPC-specific configuration for `search_all_assignments`
2062
+ # @return [::Gapic::Config::Method]
2063
+ #
2064
+ attr_reader :search_all_assignments
2065
+ ##
1936
2066
  # RPC-specific configuration for `move_assignment`
1937
2067
  # @return [::Gapic::Config::Method]
1938
2068
  #
@@ -1982,6 +2112,8 @@ module Google
1982
2112
  @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config
1983
2113
  search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments
1984
2114
  @search_assignments = ::Gapic::Config::Method.new search_assignments_config
2115
+ search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments
2116
+ @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config
1985
2117
  move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment
1986
2118
  @move_assignment = ::Gapic::Config::Method.new move_assignment_config
1987
2119
  get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation
@@ -51,7 +51,7 @@ module Google
51
51
  #
52
52
  # The resource will be in the following format:
53
53
  #
54
- # `projects/{project}/locations/{location}/bireservation`
54
+ # `projects/{project}/locations/{location}/biReservation`
55
55
  #
56
56
  # @param project [String]
57
57
  # @param location [String]
@@ -60,7 +60,7 @@ module Google
60
60
  def bi_reservation_path project:, location:
61
61
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
62
62
 
63
- "projects/#{project}/locations/#{location}/bireservation"
63
+ "projects/#{project}/locations/#{location}/biReservation"
64
64
  end
65
65
 
66
66
  ##
@@ -119,6 +119,11 @@ module Google
119
119
  # `project2`) could all be created and mapped to the same or different
120
120
  # reservations.
121
121
  #
122
+ # "None" assignments represent an absence of the assignment. Projects
123
+ # assigned to None use on-demand pricing. To create a "None" assignment, use
124
+ # "none" as a reservation_id in the parent. Example parent:
125
+ # `projects/myproject/locations/US/reservations/none`.
126
+ #
122
127
  # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
123
128
  # 'bigquery.admin' permissions on the project using the reservation
124
129
  # and the project that owns this reservation.
@@ -164,7 +169,7 @@ module Google
164
169
  # queries from `project1` will still use `res1` while queries from
165
170
  # `project2` will switch to use on-demand mode.
166
171
  rpc :DeleteAssignment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Google::Protobuf::Empty
167
- # Looks up assignments for a specified resource for a particular region.
172
+ # Deprecated: Looks up assignments for a specified resource for a particular region.
168
173
  # If the request is about a project:
169
174
  #
170
175
  # 1. Assignments created on the project will be returned if they exist.
@@ -188,6 +193,27 @@ module Google
188
193
  # **Note** "-" cannot be used for projects
189
194
  # nor locations.
190
195
  rpc :SearchAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse
196
+ # Looks up assignments for a specified resource for a particular region.
197
+ # If the request is about a project:
198
+ #
199
+ # 1. Assignments created on the project will be returned if they exist.
200
+ # 2. Otherwise assignments created on the closest ancestor will be
201
+ # returned.
202
+ # 3. Assignments for different JobTypes will all be returned.
203
+ #
204
+ # The same logic applies if the request is about a folder.
205
+ #
206
+ # If the request is about an organization, then assignments created on the
207
+ # organization will be returned (organization doesn't have ancestors).
208
+ #
209
+ # Comparing to ListAssignments, there are some behavior
210
+ # differences:
211
+ #
212
+ # 1. permission on the assignee will be verified in this API.
213
+ # 2. Hierarchy lookup (project->folder->organization) happens in this API.
214
+ # 3. Parent here is `projects/*/locations/*`, instead of
215
+ # `projects/*/locations/*reservations/*`.
216
+ rpc :SearchAllAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse
191
217
  # Moves an assignment under a new reservation.
192
218
  #
193
219
  # This differs from removing an existing assignment and recreating a new one
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigquery
23
23
  module Reservation
24
24
  module V1
25
- VERSION = "0.3.0"
25
+ VERSION = "0.4.0"
26
26
  end
27
27
  end
28
28
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -41,9 +41,16 @@ module Google
41
41
  # `google.rpc.Code.RESOURCE_EXHAUSTED`.
42
42
  # @!attribute [rw] ignore_idle_slots
43
43
  # @return [::Boolean]
44
- # If false, any query using this reservation will use idle slots from other
45
- # reservations within the same admin project. If true, a query using this
46
- # reservation will execute with the slot capacity specified above at most.
44
+ # If false, any query or pipeline job using this reservation will use idle
45
+ # slots from other reservations within the same admin project. If true, a
46
+ # query or pipeline job using this reservation will execute with the slot
47
+ # capacity specified in the slot_capacity field at most.
48
+ # @!attribute [r] creation_time
49
+ # @return [::Google::Protobuf::Timestamp]
50
+ # Output only. Creation time of the reservation.
51
+ # @!attribute [r] update_time
52
+ # @return [::Google::Protobuf::Timestamp]
53
+ # Output only. Last update time of the reservation.
47
54
  class Reservation
48
55
  include ::Google::Protobuf::MessageExts
49
56
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -72,6 +79,10 @@ module Google
72
79
  # @!attribute [r] state
73
80
  # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::State]
74
81
  # Output only. State of the commitment.
82
+ # @!attribute [r] commitment_start_time
83
+ # @return [::Google::Protobuf::Timestamp]
84
+ # Output only. The start of the current commitment period. It is applicable only for
85
+ # ACTIVE capacity commitments.
75
86
  # @!attribute [r] commitment_end_time
76
87
  # @return [::Google::Protobuf::Timestamp]
77
88
  # Output only. The end of the current commitment period. It is applicable only for ACTIVE
@@ -226,6 +237,13 @@ module Google
226
237
  # @return [::Boolean]
227
238
  # If true, fail the request if another project in the organization has a
228
239
  # capacity commitment.
240
+ # @!attribute [rw] capacity_commitment_id
241
+ # @return [::String]
242
+ # The optional capacity commitment ID. Capacity commitment name will be
243
+ # generated automatically if this field is empty.
244
+ # This field must only contain lower case alphanumeric characters or dash.
245
+ # Max length is 64 characters.
246
+ # NOTE: this ID won't be kept if the capacity commitment is split or merged.
229
247
  class CreateCapacityCommitmentRequest
230
248
  include ::Google::Protobuf::MessageExts
231
249
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -275,6 +293,11 @@ module Google
275
293
  # @return [::String]
276
294
  # Required. Resource name of the capacity commitment to delete. E.g.,
277
295
  # `projects/myproject/locations/US/capacityCommitments/123`
296
+ # @!attribute [rw] force
297
+ # @return [::Boolean]
298
+ # Can be used to force delete commitments even if assignments exist. Deleting
299
+ # commitments with assignments may cause queries to fail if they no longer
300
+ # have access to slots.
278
301
  class DeleteCapacityCommitmentRequest
279
302
  include ::Google::Protobuf::MessageExts
280
303
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -365,6 +388,10 @@ module Google
365
388
 
366
389
  # Query jobs from the project will use the reservation.
367
390
  QUERY = 2
391
+
392
+ # BigQuery ML jobs that use services external to BigQuery for model
393
+ # training. These jobs will not utilize idle slots from other reservations.
394
+ ML_EXTERNAL = 3
368
395
  end
369
396
 
370
397
  # Assignment will remain in PENDING state if no active capacity commitment is
@@ -393,6 +420,12 @@ module Google
393
420
  # @!attribute [rw] assignment
394
421
  # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
395
422
  # Assignment resource to create.
423
+ # @!attribute [rw] assignment_id
424
+ # @return [::String]
425
+ # The optional assignment ID. Assignment name will be generated automatically
426
+ # if this field is empty.
427
+ # This field must only contain lower case alphanumeric characters or dash.
428
+ # Max length is 64 characters.
396
429
  class CreateAssignmentRequest
397
430
  include ::Google::Protobuf::MessageExts
398
431
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -473,6 +506,35 @@ module Google
473
506
  extend ::Google::Protobuf::MessageExts::ClassMethods
474
507
  end
475
508
 
509
+ # The request for
510
+ # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}.
511
+ # Note: "bigquery.reservationAssignments.search" permission is required on the
512
+ # related assignee.
513
+ # @!attribute [rw] parent
514
+ # @return [::String]
515
+ # Required. The resource name with location (project name could be the wildcard '-'),
516
+ # e.g.:
517
+ # `projects/-/locations/US`.
518
+ # @!attribute [rw] query
519
+ # @return [::String]
520
+ # Please specify resource name as assignee in the query.
521
+ #
522
+ # Examples:
523
+ #
524
+ # * `assignee=projects/myproject`
525
+ # * `assignee=folders/123`
526
+ # * `assignee=organizations/456`
527
+ # @!attribute [rw] page_size
528
+ # @return [::Integer]
529
+ # The maximum number of items to return per page.
530
+ # @!attribute [rw] page_token
531
+ # @return [::String]
532
+ # The next_page_token value returned from a previous List request, if any.
533
+ class SearchAllAssignmentsRequest
534
+ include ::Google::Protobuf::MessageExts
535
+ extend ::Google::Protobuf::MessageExts::ClassMethods
536
+ end
537
+
476
538
  # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}.
477
539
  # @!attribute [rw] assignments
478
540
  # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
@@ -486,6 +548,19 @@ module Google
486
548
  extend ::Google::Protobuf::MessageExts::ClassMethods
487
549
  end
488
550
 
551
+ # The response for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}.
552
+ # @!attribute [rw] assignments
553
+ # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
554
+ # List of assignments visible to the user.
555
+ # @!attribute [rw] next_page_token
556
+ # @return [::String]
557
+ # Token to retrieve the next page of results, or empty if there are no
558
+ # more results in the list.
559
+ class SearchAllAssignmentsResponse
560
+ include ::Google::Protobuf::MessageExts
561
+ extend ::Google::Protobuf::MessageExts::ClassMethods
562
+ end
563
+
489
564
  # The request for
490
565
  # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment ReservationService.MoveAssignment}.
491
566
  #
@@ -514,7 +589,7 @@ module Google
514
589
  # @return [::String]
515
590
  # The resource name of the singleton BI reservation.
516
591
  # Reservation names have the form
517
- # `projects/{project_id}/locations/{location_id}/bireservation`.
592
+ # `projects/{project_id}/locations/{location_id}/biReservation`.
518
593
  # @!attribute [r] update_time
519
594
  # @return [::Google::Protobuf::Timestamp]
520
595
  # Output only. The last update timestamp of a reservation.
@@ -530,7 +605,7 @@ module Google
530
605
  # @!attribute [rw] name
531
606
  # @return [::String]
532
607
  # Required. Name of the requested reservation, for example:
533
- # `projects/{project_id}/locations/{location_id}/bireservation`
608
+ # `projects/{project_id}/locations/{location_id}/biReservation`
534
609
  class GetBiReservationRequest
535
610
  include ::Google::Protobuf::MessageExts
536
611
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery-reservation-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.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: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -201,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
207
  - !ruby/object:Gem::Version
202
208
  version: '0'
203
209
  requirements: []
204
- rubygems_version: 3.2.13
210
+ rubygems_version: 3.2.17
205
211
  signing_key:
206
212
  specification_version: 4
207
213
  summary: API Client library for the BigQuery Reservation V1 API