google-cloud-bigquery-reservation-v1 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.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-bigquery-reservation-v1.rb +21 -0
- data/lib/google/cloud/bigquery/reservation/v1.rb +37 -0
- data/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb +205 -0
- data/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb +65 -0
- data/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb +1996 -0
- data/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb +54 -0
- data/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb +128 -0
- data/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb +216 -0
- data/lib/google/cloud/bigquery/reservation/v1/version.rb +30 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb +554 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +206 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/bigquery/reservation/v1"
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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
|
+
require "google/cloud/bigquery/reservation/v1/reservation_service"
|
20
|
+
require "google/cloud/bigquery/reservation/v1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Bigquery
|
25
|
+
module Reservation
|
26
|
+
##
|
27
|
+
# To load this package, including all its services, and instantiate a client:
|
28
|
+
#
|
29
|
+
# require "google/cloud/bigquery/reservation/v1"
|
30
|
+
# client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
|
31
|
+
#
|
32
|
+
module V1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,205 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/bigquery/reservation/v1/reservation.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/protobuf/empty_pb'
|
11
|
+
require 'google/protobuf/field_mask_pb'
|
12
|
+
require 'google/protobuf/timestamp_pb'
|
13
|
+
require 'google/rpc/status_pb'
|
14
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
|
+
add_file("google/cloud/bigquery/reservation/v1/reservation.proto", :syntax => :proto3) do
|
16
|
+
add_message "google.cloud.bigquery.reservation.v1.Reservation" do
|
17
|
+
optional :name, :string, 1
|
18
|
+
optional :slot_capacity, :int64, 2
|
19
|
+
optional :ignore_idle_slots, :bool, 4
|
20
|
+
end
|
21
|
+
add_message "google.cloud.bigquery.reservation.v1.CapacityCommitment" do
|
22
|
+
optional :name, :string, 1
|
23
|
+
optional :slot_count, :int64, 2
|
24
|
+
optional :plan, :enum, 3, "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan"
|
25
|
+
optional :state, :enum, 4, "google.cloud.bigquery.reservation.v1.CapacityCommitment.State"
|
26
|
+
optional :commitment_end_time, :message, 5, "google.protobuf.Timestamp"
|
27
|
+
optional :failure_status, :message, 7, "google.rpc.Status"
|
28
|
+
optional :renewal_plan, :enum, 8, "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan"
|
29
|
+
end
|
30
|
+
add_enum "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan" do
|
31
|
+
value :COMMITMENT_PLAN_UNSPECIFIED, 0
|
32
|
+
value :FLEX, 3
|
33
|
+
value :TRIAL, 5
|
34
|
+
value :MONTHLY, 2
|
35
|
+
value :ANNUAL, 4
|
36
|
+
end
|
37
|
+
add_enum "google.cloud.bigquery.reservation.v1.CapacityCommitment.State" do
|
38
|
+
value :STATE_UNSPECIFIED, 0
|
39
|
+
value :PENDING, 1
|
40
|
+
value :ACTIVE, 2
|
41
|
+
value :FAILED, 3
|
42
|
+
end
|
43
|
+
add_message "google.cloud.bigquery.reservation.v1.CreateReservationRequest" do
|
44
|
+
optional :parent, :string, 1
|
45
|
+
optional :reservation_id, :string, 2
|
46
|
+
optional :reservation, :message, 3, "google.cloud.bigquery.reservation.v1.Reservation"
|
47
|
+
end
|
48
|
+
add_message "google.cloud.bigquery.reservation.v1.ListReservationsRequest" do
|
49
|
+
optional :parent, :string, 1
|
50
|
+
optional :page_size, :int32, 2
|
51
|
+
optional :page_token, :string, 3
|
52
|
+
end
|
53
|
+
add_message "google.cloud.bigquery.reservation.v1.ListReservationsResponse" do
|
54
|
+
repeated :reservations, :message, 1, "google.cloud.bigquery.reservation.v1.Reservation"
|
55
|
+
optional :next_page_token, :string, 2
|
56
|
+
end
|
57
|
+
add_message "google.cloud.bigquery.reservation.v1.GetReservationRequest" do
|
58
|
+
optional :name, :string, 1
|
59
|
+
end
|
60
|
+
add_message "google.cloud.bigquery.reservation.v1.DeleteReservationRequest" do
|
61
|
+
optional :name, :string, 1
|
62
|
+
end
|
63
|
+
add_message "google.cloud.bigquery.reservation.v1.UpdateReservationRequest" do
|
64
|
+
optional :reservation, :message, 1, "google.cloud.bigquery.reservation.v1.Reservation"
|
65
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
66
|
+
end
|
67
|
+
add_message "google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest" do
|
68
|
+
optional :parent, :string, 1
|
69
|
+
optional :capacity_commitment, :message, 2, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
|
70
|
+
optional :enforce_single_admin_project_per_org, :bool, 4
|
71
|
+
end
|
72
|
+
add_message "google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest" do
|
73
|
+
optional :parent, :string, 1
|
74
|
+
optional :page_size, :int32, 2
|
75
|
+
optional :page_token, :string, 3
|
76
|
+
end
|
77
|
+
add_message "google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse" do
|
78
|
+
repeated :capacity_commitments, :message, 1, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
|
79
|
+
optional :next_page_token, :string, 2
|
80
|
+
end
|
81
|
+
add_message "google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest" do
|
82
|
+
optional :name, :string, 1
|
83
|
+
end
|
84
|
+
add_message "google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest" do
|
85
|
+
optional :name, :string, 1
|
86
|
+
end
|
87
|
+
add_message "google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest" do
|
88
|
+
optional :capacity_commitment, :message, 1, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
|
89
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
90
|
+
end
|
91
|
+
add_message "google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest" do
|
92
|
+
optional :name, :string, 1
|
93
|
+
optional :slot_count, :int64, 2
|
94
|
+
end
|
95
|
+
add_message "google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse" do
|
96
|
+
optional :first, :message, 1, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
|
97
|
+
optional :second, :message, 2, "google.cloud.bigquery.reservation.v1.CapacityCommitment"
|
98
|
+
end
|
99
|
+
add_message "google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest" do
|
100
|
+
optional :parent, :string, 1
|
101
|
+
repeated :capacity_commitment_ids, :string, 2
|
102
|
+
end
|
103
|
+
add_message "google.cloud.bigquery.reservation.v1.Assignment" do
|
104
|
+
optional :name, :string, 1
|
105
|
+
optional :assignee, :string, 4
|
106
|
+
optional :job_type, :enum, 3, "google.cloud.bigquery.reservation.v1.Assignment.JobType"
|
107
|
+
optional :state, :enum, 6, "google.cloud.bigquery.reservation.v1.Assignment.State"
|
108
|
+
end
|
109
|
+
add_enum "google.cloud.bigquery.reservation.v1.Assignment.JobType" do
|
110
|
+
value :JOB_TYPE_UNSPECIFIED, 0
|
111
|
+
value :PIPELINE, 1
|
112
|
+
value :QUERY, 2
|
113
|
+
end
|
114
|
+
add_enum "google.cloud.bigquery.reservation.v1.Assignment.State" do
|
115
|
+
value :STATE_UNSPECIFIED, 0
|
116
|
+
value :PENDING, 1
|
117
|
+
value :ACTIVE, 2
|
118
|
+
end
|
119
|
+
add_message "google.cloud.bigquery.reservation.v1.CreateAssignmentRequest" do
|
120
|
+
optional :parent, :string, 1
|
121
|
+
optional :assignment, :message, 2, "google.cloud.bigquery.reservation.v1.Assignment"
|
122
|
+
end
|
123
|
+
add_message "google.cloud.bigquery.reservation.v1.ListAssignmentsRequest" do
|
124
|
+
optional :parent, :string, 1
|
125
|
+
optional :page_size, :int32, 2
|
126
|
+
optional :page_token, :string, 3
|
127
|
+
end
|
128
|
+
add_message "google.cloud.bigquery.reservation.v1.ListAssignmentsResponse" do
|
129
|
+
repeated :assignments, :message, 1, "google.cloud.bigquery.reservation.v1.Assignment"
|
130
|
+
optional :next_page_token, :string, 2
|
131
|
+
end
|
132
|
+
add_message "google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest" do
|
133
|
+
optional :name, :string, 1
|
134
|
+
end
|
135
|
+
add_message "google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest" do
|
136
|
+
optional :parent, :string, 1
|
137
|
+
optional :query, :string, 2
|
138
|
+
optional :page_size, :int32, 3
|
139
|
+
optional :page_token, :string, 4
|
140
|
+
end
|
141
|
+
add_message "google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse" do
|
142
|
+
repeated :assignments, :message, 1, "google.cloud.bigquery.reservation.v1.Assignment"
|
143
|
+
optional :next_page_token, :string, 2
|
144
|
+
end
|
145
|
+
add_message "google.cloud.bigquery.reservation.v1.MoveAssignmentRequest" do
|
146
|
+
optional :name, :string, 1
|
147
|
+
optional :destination_id, :string, 3
|
148
|
+
end
|
149
|
+
add_message "google.cloud.bigquery.reservation.v1.BiReservation" do
|
150
|
+
optional :name, :string, 1
|
151
|
+
optional :update_time, :message, 3, "google.protobuf.Timestamp"
|
152
|
+
optional :size, :int64, 4
|
153
|
+
end
|
154
|
+
add_message "google.cloud.bigquery.reservation.v1.GetBiReservationRequest" do
|
155
|
+
optional :name, :string, 1
|
156
|
+
end
|
157
|
+
add_message "google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest" do
|
158
|
+
optional :bi_reservation, :message, 1, "google.cloud.bigquery.reservation.v1.BiReservation"
|
159
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
module Google
|
165
|
+
module Cloud
|
166
|
+
module Bigquery
|
167
|
+
module Reservation
|
168
|
+
module V1
|
169
|
+
Reservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation").msgclass
|
170
|
+
CapacityCommitment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment").msgclass
|
171
|
+
CapacityCommitment::CommitmentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan").enummodule
|
172
|
+
CapacityCommitment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.State").enummodule
|
173
|
+
CreateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationRequest").msgclass
|
174
|
+
ListReservationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsRequest").msgclass
|
175
|
+
ListReservationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsResponse").msgclass
|
176
|
+
GetReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationRequest").msgclass
|
177
|
+
DeleteReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationRequest").msgclass
|
178
|
+
UpdateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateReservationRequest").msgclass
|
179
|
+
CreateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest").msgclass
|
180
|
+
ListCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest").msgclass
|
181
|
+
ListCapacityCommitmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse").msgclass
|
182
|
+
GetCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest").msgclass
|
183
|
+
DeleteCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest").msgclass
|
184
|
+
UpdateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest").msgclass
|
185
|
+
SplitCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest").msgclass
|
186
|
+
SplitCapacityCommitmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse").msgclass
|
187
|
+
MergeCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest").msgclass
|
188
|
+
Assignment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment").msgclass
|
189
|
+
Assignment::JobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.JobType").enummodule
|
190
|
+
Assignment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.State").enummodule
|
191
|
+
CreateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateAssignmentRequest").msgclass
|
192
|
+
ListAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsRequest").msgclass
|
193
|
+
ListAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsResponse").msgclass
|
194
|
+
DeleteAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest").msgclass
|
195
|
+
SearchAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest").msgclass
|
196
|
+
SearchAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse").msgclass
|
197
|
+
MoveAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MoveAssignmentRequest").msgclass
|
198
|
+
BiReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.BiReservation").msgclass
|
199
|
+
GetBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetBiReservationRequest").msgclass
|
200
|
+
UpdateBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest").msgclass
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/bigquery/reservation/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/bigquery/reservation/v1/reservation_service/credentials"
|
26
|
+
require "google/cloud/bigquery/reservation/v1/reservation_service/paths"
|
27
|
+
require "google/cloud/bigquery/reservation/v1/reservation_service/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Bigquery
|
32
|
+
module Reservation
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# This API allows users to manage their flat-rate BigQuery reservations.
|
36
|
+
#
|
37
|
+
# A reservation provides computational resource guarantees, in the form of
|
38
|
+
# [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a
|
39
|
+
# unit of computational power in BigQuery, and serves as the basic unit of
|
40
|
+
# parallelism. In a scan of a multi-partitioned table, a single slot operates
|
41
|
+
# on a single partition of the table. A reservation resource exists as a child
|
42
|
+
# resource of the admin project and location, e.g.:
|
43
|
+
# `projects/myproject/locations/US/reservations/reservationName`.
|
44
|
+
#
|
45
|
+
# A capacity commitment is a way to purchase compute capacity for BigQuery jobs
|
46
|
+
# (in the form of slots) with some committed period of usage. A capacity
|
47
|
+
# commitment resource exists as a child resource of the admin project and
|
48
|
+
# location, e.g.:
|
49
|
+
# `projects/myproject/locations/US/capacityCommitments/id`.
|
50
|
+
#
|
51
|
+
# To load this service and instantiate a client:
|
52
|
+
#
|
53
|
+
# require "google/cloud/bigquery/reservation/v1/reservation_service"
|
54
|
+
# client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
|
55
|
+
#
|
56
|
+
module ReservationService
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
helper_path = ::File.join __dir__, "reservation_service", "helpers.rb"
|
65
|
+
require "google/cloud/bigquery/reservation/v1/reservation_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,1996 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/bigquery/reservation/v1/reservation_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Bigquery
|
25
|
+
module Reservation
|
26
|
+
module V1
|
27
|
+
module ReservationService
|
28
|
+
##
|
29
|
+
# Client for the ReservationService service.
|
30
|
+
#
|
31
|
+
# This API allows users to manage their flat-rate BigQuery reservations.
|
32
|
+
#
|
33
|
+
# A reservation provides computational resource guarantees, in the form of
|
34
|
+
# [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a
|
35
|
+
# unit of computational power in BigQuery, and serves as the basic unit of
|
36
|
+
# parallelism. In a scan of a multi-partitioned table, a single slot operates
|
37
|
+
# on a single partition of the table. A reservation resource exists as a child
|
38
|
+
# resource of the admin project and location, e.g.:
|
39
|
+
# `projects/myproject/locations/US/reservations/reservationName`.
|
40
|
+
#
|
41
|
+
# A capacity commitment is a way to purchase compute capacity for BigQuery jobs
|
42
|
+
# (in the form of slots) with some committed period of usage. A capacity
|
43
|
+
# commitment resource exists as a child resource of the admin project and
|
44
|
+
# location, e.g.:
|
45
|
+
# `projects/myproject/locations/US/capacityCommitments/id`.
|
46
|
+
#
|
47
|
+
class Client
|
48
|
+
include Paths
|
49
|
+
|
50
|
+
# @private
|
51
|
+
attr_reader :reservation_service_stub
|
52
|
+
|
53
|
+
##
|
54
|
+
# Configure the ReservationService Client class.
|
55
|
+
#
|
56
|
+
# See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration}
|
57
|
+
# for a description of the configuration fields.
|
58
|
+
#
|
59
|
+
# ## Example
|
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
|
66
|
+
#
|
67
|
+
# @yield [config] Configure the Client client.
|
68
|
+
# @yieldparam config [Client::Configuration]
|
69
|
+
#
|
70
|
+
# @return [Client::Configuration]
|
71
|
+
#
|
72
|
+
def self.configure
|
73
|
+
@configure ||= begin
|
74
|
+
namespace = ["Google", "Cloud", "Bigquery", "Reservation", "V1"]
|
75
|
+
parent_config = while namespace.any?
|
76
|
+
parent_name = namespace.join "::"
|
77
|
+
parent_const = const_get parent_name
|
78
|
+
break parent_const.configure if parent_const&.respond_to? :configure
|
79
|
+
namespace.pop
|
80
|
+
end
|
81
|
+
default_config = Client::Configuration.new parent_config
|
82
|
+
|
83
|
+
default_config.rpcs.create_reservation.timeout = 60.0
|
84
|
+
|
85
|
+
default_config.rpcs.list_reservations.timeout = 60.0
|
86
|
+
default_config.rpcs.list_reservations.retry_policy = {
|
87
|
+
initial_delay: 0.1,
|
88
|
+
max_delay: 60.0,
|
89
|
+
multiplier: 1.3,
|
90
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
91
|
+
}
|
92
|
+
|
93
|
+
default_config.rpcs.get_reservation.timeout = 60.0
|
94
|
+
default_config.rpcs.get_reservation.retry_policy = {
|
95
|
+
initial_delay: 0.1,
|
96
|
+
max_delay: 60.0,
|
97
|
+
multiplier: 1.3,
|
98
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
99
|
+
}
|
100
|
+
|
101
|
+
default_config.rpcs.delete_reservation.timeout = 60.0
|
102
|
+
default_config.rpcs.delete_reservation.retry_policy = {
|
103
|
+
initial_delay: 0.1,
|
104
|
+
max_delay: 60.0,
|
105
|
+
multiplier: 1.3,
|
106
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
107
|
+
}
|
108
|
+
|
109
|
+
default_config.rpcs.update_reservation.timeout = 60.0
|
110
|
+
|
111
|
+
default_config.rpcs.create_capacity_commitment.timeout = 60.0
|
112
|
+
|
113
|
+
default_config.rpcs.list_capacity_commitments.timeout = 60.0
|
114
|
+
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: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
119
|
+
}
|
120
|
+
|
121
|
+
default_config.rpcs.get_capacity_commitment.timeout = 60.0
|
122
|
+
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: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
127
|
+
}
|
128
|
+
|
129
|
+
default_config.rpcs.delete_capacity_commitment.timeout = 60.0
|
130
|
+
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: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
135
|
+
}
|
136
|
+
|
137
|
+
default_config.rpcs.update_capacity_commitment.timeout = 60.0
|
138
|
+
|
139
|
+
default_config.rpcs.split_capacity_commitment.timeout = 60.0
|
140
|
+
|
141
|
+
default_config.rpcs.merge_capacity_commitments.timeout = 60.0
|
142
|
+
|
143
|
+
default_config.rpcs.create_assignment.timeout = 60.0
|
144
|
+
|
145
|
+
default_config.rpcs.list_assignments.timeout = 60.0
|
146
|
+
default_config.rpcs.list_assignments.retry_policy = {
|
147
|
+
initial_delay: 0.1,
|
148
|
+
max_delay: 60.0,
|
149
|
+
multiplier: 1.3,
|
150
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
151
|
+
}
|
152
|
+
|
153
|
+
default_config.rpcs.delete_assignment.timeout = 60.0
|
154
|
+
default_config.rpcs.delete_assignment.retry_policy = {
|
155
|
+
initial_delay: 0.1,
|
156
|
+
max_delay: 60.0,
|
157
|
+
multiplier: 1.3,
|
158
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
159
|
+
}
|
160
|
+
|
161
|
+
default_config.rpcs.search_assignments.timeout = 60.0
|
162
|
+
default_config.rpcs.search_assignments.retry_policy = {
|
163
|
+
initial_delay: 0.1,
|
164
|
+
max_delay: 60.0,
|
165
|
+
multiplier: 1.3,
|
166
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
167
|
+
}
|
168
|
+
|
169
|
+
default_config.rpcs.move_assignment.timeout = 60.0
|
170
|
+
|
171
|
+
default_config.rpcs.get_bi_reservation.timeout = 60.0
|
172
|
+
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: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
177
|
+
}
|
178
|
+
|
179
|
+
default_config.rpcs.update_bi_reservation.timeout = 60.0
|
180
|
+
|
181
|
+
default_config
|
182
|
+
end
|
183
|
+
yield @configure if block_given?
|
184
|
+
@configure
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Configure the ReservationService Client instance.
|
189
|
+
#
|
190
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
191
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
192
|
+
# should be made on {Client.configure}.
|
193
|
+
#
|
194
|
+
# See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration}
|
195
|
+
# for a description of the configuration fields.
|
196
|
+
#
|
197
|
+
# @yield [config] Configure the Client client.
|
198
|
+
# @yieldparam config [Client::Configuration]
|
199
|
+
#
|
200
|
+
# @return [Client::Configuration]
|
201
|
+
#
|
202
|
+
def configure
|
203
|
+
yield @config if block_given?
|
204
|
+
@config
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# Create a new ReservationService client object.
|
209
|
+
#
|
210
|
+
# ## Examples
|
211
|
+
#
|
212
|
+
# To create a new ReservationService client with the default
|
213
|
+
# configuration:
|
214
|
+
#
|
215
|
+
# client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
|
216
|
+
#
|
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
|
223
|
+
#
|
224
|
+
# @yield [config] Configure the ReservationService client.
|
225
|
+
# @yieldparam config [Client::Configuration]
|
226
|
+
#
|
227
|
+
def initialize
|
228
|
+
# These require statements are intentionally placed here to initialize
|
229
|
+
# the gRPC module only when it's required.
|
230
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
231
|
+
require "gapic/grpc"
|
232
|
+
require "google/cloud/bigquery/reservation/v1/reservation_services_pb"
|
233
|
+
|
234
|
+
# Create the configuration object
|
235
|
+
@config = Configuration.new Client.configure
|
236
|
+
|
237
|
+
# Yield the configuration if needed
|
238
|
+
yield @config if block_given?
|
239
|
+
|
240
|
+
# Create credentials
|
241
|
+
credentials = @config.credentials
|
242
|
+
credentials ||= Credentials.default scope: @config.scope
|
243
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
244
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
245
|
+
end
|
246
|
+
@quota_project_id = @config.quota_project
|
247
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
248
|
+
|
249
|
+
@reservation_service_stub = ::Gapic::ServiceStub.new(
|
250
|
+
::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Stub,
|
251
|
+
credentials: credentials,
|
252
|
+
endpoint: @config.endpoint,
|
253
|
+
channel_args: @config.channel_args,
|
254
|
+
interceptors: @config.interceptors
|
255
|
+
)
|
256
|
+
end
|
257
|
+
|
258
|
+
# Service calls
|
259
|
+
|
260
|
+
##
|
261
|
+
# Creates a new reservation resource.
|
262
|
+
#
|
263
|
+
# @overload create_reservation(request, options = nil)
|
264
|
+
# Pass arguments to `create_reservation` via a request object, either of type
|
265
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash.
|
266
|
+
#
|
267
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash]
|
268
|
+
# A request object representing the call parameters. Required. To specify no
|
269
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
270
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
271
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
272
|
+
#
|
273
|
+
# @overload create_reservation(parent: nil, reservation_id: nil, reservation: nil)
|
274
|
+
# Pass arguments to `create_reservation` via keyword arguments. Note that at
|
275
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
276
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
277
|
+
#
|
278
|
+
# @param parent [::String]
|
279
|
+
# Required. Project, location. E.g.,
|
280
|
+
# `projects/myproject/locations/US`
|
281
|
+
# @param reservation_id [::String]
|
282
|
+
# The reservation ID. This field must only contain lower case alphanumeric
|
283
|
+
# characters or dash. Max length is 64 characters.
|
284
|
+
# @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash]
|
285
|
+
# Definition of the new reservation to create.
|
286
|
+
#
|
287
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
288
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation]
|
289
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
290
|
+
#
|
291
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation]
|
292
|
+
#
|
293
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
294
|
+
#
|
295
|
+
def create_reservation request, options = nil
|
296
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
297
|
+
|
298
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest
|
299
|
+
|
300
|
+
# Converts hash and nil to an options object
|
301
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
302
|
+
|
303
|
+
# Customize the options with defaults
|
304
|
+
metadata = @config.rpcs.create_reservation.metadata.to_h
|
305
|
+
|
306
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
307
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
308
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
309
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
310
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
311
|
+
|
312
|
+
header_params = {
|
313
|
+
"parent" => request.parent
|
314
|
+
}
|
315
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
316
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
317
|
+
|
318
|
+
options.apply_defaults timeout: @config.rpcs.create_reservation.timeout,
|
319
|
+
metadata: metadata,
|
320
|
+
retry_policy: @config.rpcs.create_reservation.retry_policy
|
321
|
+
options.apply_defaults metadata: @config.metadata,
|
322
|
+
retry_policy: @config.retry_policy
|
323
|
+
|
324
|
+
@reservation_service_stub.call_rpc :create_reservation, request, options: options do |response, operation|
|
325
|
+
yield response, operation if block_given?
|
326
|
+
return response
|
327
|
+
end
|
328
|
+
rescue ::GRPC::BadStatus => e
|
329
|
+
raise ::Google::Cloud::Error.from_error(e)
|
330
|
+
end
|
331
|
+
|
332
|
+
##
|
333
|
+
# Lists all the reservations for the project in the specified location.
|
334
|
+
#
|
335
|
+
# @overload list_reservations(request, options = nil)
|
336
|
+
# Pass arguments to `list_reservations` via a request object, either of type
|
337
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash.
|
338
|
+
#
|
339
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash]
|
340
|
+
# A request object representing the call parameters. Required. To specify no
|
341
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
342
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
343
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
344
|
+
#
|
345
|
+
# @overload list_reservations(parent: nil, page_size: nil, page_token: nil)
|
346
|
+
# Pass arguments to `list_reservations` via keyword arguments. Note that at
|
347
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
348
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
349
|
+
#
|
350
|
+
# @param parent [::String]
|
351
|
+
# Required. The parent resource name containing project and location, e.g.:
|
352
|
+
# `projects/myproject/locations/US`
|
353
|
+
# @param page_size [::Integer]
|
354
|
+
# The maximum number of items to return per page.
|
355
|
+
# @param page_token [::String]
|
356
|
+
# The next_page_token value returned from a previous List request, if any.
|
357
|
+
#
|
358
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
359
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>]
|
360
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
361
|
+
#
|
362
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>]
|
363
|
+
#
|
364
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
365
|
+
#
|
366
|
+
def list_reservations request, options = nil
|
367
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
368
|
+
|
369
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest
|
370
|
+
|
371
|
+
# Converts hash and nil to an options object
|
372
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
373
|
+
|
374
|
+
# Customize the options with defaults
|
375
|
+
metadata = @config.rpcs.list_reservations.metadata.to_h
|
376
|
+
|
377
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
378
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
379
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
380
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
381
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
382
|
+
|
383
|
+
header_params = {
|
384
|
+
"parent" => request.parent
|
385
|
+
}
|
386
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
387
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
388
|
+
|
389
|
+
options.apply_defaults timeout: @config.rpcs.list_reservations.timeout,
|
390
|
+
metadata: metadata,
|
391
|
+
retry_policy: @config.rpcs.list_reservations.retry_policy
|
392
|
+
options.apply_defaults metadata: @config.metadata,
|
393
|
+
retry_policy: @config.retry_policy
|
394
|
+
|
395
|
+
@reservation_service_stub.call_rpc :list_reservations, request, options: options do |response, operation|
|
396
|
+
response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservations, request, response, operation, options
|
397
|
+
yield response, operation if block_given?
|
398
|
+
return response
|
399
|
+
end
|
400
|
+
rescue ::GRPC::BadStatus => e
|
401
|
+
raise ::Google::Cloud::Error.from_error(e)
|
402
|
+
end
|
403
|
+
|
404
|
+
##
|
405
|
+
# Returns information about the reservation.
|
406
|
+
#
|
407
|
+
# @overload get_reservation(request, options = nil)
|
408
|
+
# Pass arguments to `get_reservation` via a request object, either of type
|
409
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash.
|
410
|
+
#
|
411
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash]
|
412
|
+
# A request object representing the call parameters. Required. To specify no
|
413
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
414
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
415
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
416
|
+
#
|
417
|
+
# @overload get_reservation(name: nil)
|
418
|
+
# Pass arguments to `get_reservation` via keyword arguments. Note that at
|
419
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
420
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
421
|
+
#
|
422
|
+
# @param name [::String]
|
423
|
+
# Required. Resource name of the reservation to retrieve. E.g.,
|
424
|
+
# `projects/myproject/locations/US/reservations/team1-prod`
|
425
|
+
#
|
426
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
427
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation]
|
428
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
429
|
+
#
|
430
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation]
|
431
|
+
#
|
432
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
433
|
+
#
|
434
|
+
def get_reservation request, options = nil
|
435
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
436
|
+
|
437
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest
|
438
|
+
|
439
|
+
# Converts hash and nil to an options object
|
440
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
441
|
+
|
442
|
+
# Customize the options with defaults
|
443
|
+
metadata = @config.rpcs.get_reservation.metadata.to_h
|
444
|
+
|
445
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
446
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
447
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
448
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
449
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
450
|
+
|
451
|
+
header_params = {
|
452
|
+
"name" => request.name
|
453
|
+
}
|
454
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
455
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
456
|
+
|
457
|
+
options.apply_defaults timeout: @config.rpcs.get_reservation.timeout,
|
458
|
+
metadata: metadata,
|
459
|
+
retry_policy: @config.rpcs.get_reservation.retry_policy
|
460
|
+
options.apply_defaults metadata: @config.metadata,
|
461
|
+
retry_policy: @config.retry_policy
|
462
|
+
|
463
|
+
@reservation_service_stub.call_rpc :get_reservation, request, options: options do |response, operation|
|
464
|
+
yield response, operation if block_given?
|
465
|
+
return response
|
466
|
+
end
|
467
|
+
rescue ::GRPC::BadStatus => e
|
468
|
+
raise ::Google::Cloud::Error.from_error(e)
|
469
|
+
end
|
470
|
+
|
471
|
+
##
|
472
|
+
# Deletes a reservation.
|
473
|
+
# Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has
|
474
|
+
# assignments.
|
475
|
+
#
|
476
|
+
# @overload delete_reservation(request, options = nil)
|
477
|
+
# Pass arguments to `delete_reservation` via a request object, either of type
|
478
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash.
|
479
|
+
#
|
480
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash]
|
481
|
+
# A request object representing the call parameters. Required. To specify no
|
482
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
483
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
484
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
485
|
+
#
|
486
|
+
# @overload delete_reservation(name: nil)
|
487
|
+
# Pass arguments to `delete_reservation` via keyword arguments. Note that at
|
488
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
489
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
490
|
+
#
|
491
|
+
# @param name [::String]
|
492
|
+
# Required. Resource name of the reservation to retrieve. E.g.,
|
493
|
+
# `projects/myproject/locations/US/reservations/team1-prod`
|
494
|
+
#
|
495
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
496
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
497
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
498
|
+
#
|
499
|
+
# @return [::Google::Protobuf::Empty]
|
500
|
+
#
|
501
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
502
|
+
#
|
503
|
+
def delete_reservation request, options = nil
|
504
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
505
|
+
|
506
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest
|
507
|
+
|
508
|
+
# Converts hash and nil to an options object
|
509
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
510
|
+
|
511
|
+
# Customize the options with defaults
|
512
|
+
metadata = @config.rpcs.delete_reservation.metadata.to_h
|
513
|
+
|
514
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
515
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
516
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
517
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
518
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
519
|
+
|
520
|
+
header_params = {
|
521
|
+
"name" => request.name
|
522
|
+
}
|
523
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
524
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
525
|
+
|
526
|
+
options.apply_defaults timeout: @config.rpcs.delete_reservation.timeout,
|
527
|
+
metadata: metadata,
|
528
|
+
retry_policy: @config.rpcs.delete_reservation.retry_policy
|
529
|
+
options.apply_defaults metadata: @config.metadata,
|
530
|
+
retry_policy: @config.retry_policy
|
531
|
+
|
532
|
+
@reservation_service_stub.call_rpc :delete_reservation, request, options: options do |response, operation|
|
533
|
+
yield response, operation if block_given?
|
534
|
+
return response
|
535
|
+
end
|
536
|
+
rescue ::GRPC::BadStatus => e
|
537
|
+
raise ::Google::Cloud::Error.from_error(e)
|
538
|
+
end
|
539
|
+
|
540
|
+
##
|
541
|
+
# Updates an existing reservation resource.
|
542
|
+
#
|
543
|
+
# @overload update_reservation(request, options = nil)
|
544
|
+
# Pass arguments to `update_reservation` via a request object, either of type
|
545
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash.
|
546
|
+
#
|
547
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash]
|
548
|
+
# A request object representing the call parameters. Required. To specify no
|
549
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
550
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
551
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
552
|
+
#
|
553
|
+
# @overload update_reservation(reservation: nil, update_mask: nil)
|
554
|
+
# Pass arguments to `update_reservation` via keyword arguments. Note that at
|
555
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
556
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
557
|
+
#
|
558
|
+
# @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash]
|
559
|
+
# Content of the reservation to update.
|
560
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
561
|
+
# Standard field mask for the set of fields to be updated.
|
562
|
+
#
|
563
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
564
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation]
|
565
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
566
|
+
#
|
567
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation]
|
568
|
+
#
|
569
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
570
|
+
#
|
571
|
+
def update_reservation request, options = nil
|
572
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
573
|
+
|
574
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest
|
575
|
+
|
576
|
+
# Converts hash and nil to an options object
|
577
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
578
|
+
|
579
|
+
# Customize the options with defaults
|
580
|
+
metadata = @config.rpcs.update_reservation.metadata.to_h
|
581
|
+
|
582
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
583
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
584
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
585
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
586
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
587
|
+
|
588
|
+
header_params = {
|
589
|
+
"reservation.name" => request.reservation.name
|
590
|
+
}
|
591
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
592
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
593
|
+
|
594
|
+
options.apply_defaults timeout: @config.rpcs.update_reservation.timeout,
|
595
|
+
metadata: metadata,
|
596
|
+
retry_policy: @config.rpcs.update_reservation.retry_policy
|
597
|
+
options.apply_defaults metadata: @config.metadata,
|
598
|
+
retry_policy: @config.retry_policy
|
599
|
+
|
600
|
+
@reservation_service_stub.call_rpc :update_reservation, request, options: options do |response, operation|
|
601
|
+
yield response, operation if block_given?
|
602
|
+
return response
|
603
|
+
end
|
604
|
+
rescue ::GRPC::BadStatus => e
|
605
|
+
raise ::Google::Cloud::Error.from_error(e)
|
606
|
+
end
|
607
|
+
|
608
|
+
##
|
609
|
+
# Creates a new capacity commitment resource.
|
610
|
+
#
|
611
|
+
# @overload create_capacity_commitment(request, options = nil)
|
612
|
+
# Pass arguments to `create_capacity_commitment` via a request object, either of type
|
613
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash.
|
614
|
+
#
|
615
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash]
|
616
|
+
# A request object representing the call parameters. Required. To specify no
|
617
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
618
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
619
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
620
|
+
#
|
621
|
+
# @overload create_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil)
|
622
|
+
# Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at
|
623
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
624
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
625
|
+
#
|
626
|
+
# @param parent [::String]
|
627
|
+
# Required. Resource name of the parent reservation. E.g.,
|
628
|
+
# `projects/myproject/locations/US`
|
629
|
+
# @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash]
|
630
|
+
# Content of the capacity commitment to create.
|
631
|
+
# @param enforce_single_admin_project_per_org [::Boolean]
|
632
|
+
# If true, fail the request if another project in the organization has a
|
633
|
+
# capacity commitment.
|
634
|
+
#
|
635
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
636
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
637
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
638
|
+
#
|
639
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
640
|
+
#
|
641
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
642
|
+
#
|
643
|
+
def create_capacity_commitment request, options = nil
|
644
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
645
|
+
|
646
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest
|
647
|
+
|
648
|
+
# Converts hash and nil to an options object
|
649
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
650
|
+
|
651
|
+
# Customize the options with defaults
|
652
|
+
metadata = @config.rpcs.create_capacity_commitment.metadata.to_h
|
653
|
+
|
654
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
655
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
656
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
657
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
658
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
659
|
+
|
660
|
+
header_params = {
|
661
|
+
"parent" => request.parent
|
662
|
+
}
|
663
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
664
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
665
|
+
|
666
|
+
options.apply_defaults timeout: @config.rpcs.create_capacity_commitment.timeout,
|
667
|
+
metadata: metadata,
|
668
|
+
retry_policy: @config.rpcs.create_capacity_commitment.retry_policy
|
669
|
+
options.apply_defaults metadata: @config.metadata,
|
670
|
+
retry_policy: @config.retry_policy
|
671
|
+
|
672
|
+
@reservation_service_stub.call_rpc :create_capacity_commitment, request, options: options do |response, operation|
|
673
|
+
yield response, operation if block_given?
|
674
|
+
return response
|
675
|
+
end
|
676
|
+
rescue ::GRPC::BadStatus => e
|
677
|
+
raise ::Google::Cloud::Error.from_error(e)
|
678
|
+
end
|
679
|
+
|
680
|
+
##
|
681
|
+
# Lists all the capacity commitments for the admin project.
|
682
|
+
#
|
683
|
+
# @overload list_capacity_commitments(request, options = nil)
|
684
|
+
# Pass arguments to `list_capacity_commitments` via a request object, either of type
|
685
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash.
|
686
|
+
#
|
687
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash]
|
688
|
+
# A request object representing the call parameters. Required. To specify no
|
689
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
690
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
691
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
692
|
+
#
|
693
|
+
# @overload list_capacity_commitments(parent: nil, page_size: nil, page_token: nil)
|
694
|
+
# Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at
|
695
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
696
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
697
|
+
#
|
698
|
+
# @param parent [::String]
|
699
|
+
# Required. Resource name of the parent reservation. E.g.,
|
700
|
+
# `projects/myproject/locations/US`
|
701
|
+
# @param page_size [::Integer]
|
702
|
+
# The maximum number of items to return.
|
703
|
+
# @param page_token [::String]
|
704
|
+
# The next_page_token value returned from a previous List request, if any.
|
705
|
+
#
|
706
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
707
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>]
|
708
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
709
|
+
#
|
710
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>]
|
711
|
+
#
|
712
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
713
|
+
#
|
714
|
+
def list_capacity_commitments request, options = nil
|
715
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
716
|
+
|
717
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest
|
718
|
+
|
719
|
+
# Converts hash and nil to an options object
|
720
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
721
|
+
|
722
|
+
# Customize the options with defaults
|
723
|
+
metadata = @config.rpcs.list_capacity_commitments.metadata.to_h
|
724
|
+
|
725
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
726
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
727
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
728
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
729
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
730
|
+
|
731
|
+
header_params = {
|
732
|
+
"parent" => request.parent
|
733
|
+
}
|
734
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
735
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
736
|
+
|
737
|
+
options.apply_defaults timeout: @config.rpcs.list_capacity_commitments.timeout,
|
738
|
+
metadata: metadata,
|
739
|
+
retry_policy: @config.rpcs.list_capacity_commitments.retry_policy
|
740
|
+
options.apply_defaults metadata: @config.metadata,
|
741
|
+
retry_policy: @config.retry_policy
|
742
|
+
|
743
|
+
@reservation_service_stub.call_rpc :list_capacity_commitments, request, options: options do |response, operation|
|
744
|
+
response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, request, response, operation, options
|
745
|
+
yield response, operation if block_given?
|
746
|
+
return response
|
747
|
+
end
|
748
|
+
rescue ::GRPC::BadStatus => e
|
749
|
+
raise ::Google::Cloud::Error.from_error(e)
|
750
|
+
end
|
751
|
+
|
752
|
+
##
|
753
|
+
# Returns information about the capacity commitment.
|
754
|
+
#
|
755
|
+
# @overload get_capacity_commitment(request, options = nil)
|
756
|
+
# Pass arguments to `get_capacity_commitment` via a request object, either of type
|
757
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash.
|
758
|
+
#
|
759
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash]
|
760
|
+
# A request object representing the call parameters. Required. To specify no
|
761
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
762
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
763
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
764
|
+
#
|
765
|
+
# @overload get_capacity_commitment(name: nil)
|
766
|
+
# Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at
|
767
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
768
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
769
|
+
#
|
770
|
+
# @param name [::String]
|
771
|
+
# Required. Resource name of the capacity commitment to retrieve. E.g.,
|
772
|
+
# `projects/myproject/locations/US/capacityCommitments/123`
|
773
|
+
#
|
774
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
775
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
776
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
777
|
+
#
|
778
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
779
|
+
#
|
780
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
781
|
+
#
|
782
|
+
def get_capacity_commitment request, options = nil
|
783
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
784
|
+
|
785
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest
|
786
|
+
|
787
|
+
# Converts hash and nil to an options object
|
788
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
789
|
+
|
790
|
+
# Customize the options with defaults
|
791
|
+
metadata = @config.rpcs.get_capacity_commitment.metadata.to_h
|
792
|
+
|
793
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
794
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
795
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
796
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
797
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
798
|
+
|
799
|
+
header_params = {
|
800
|
+
"name" => request.name
|
801
|
+
}
|
802
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
803
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
804
|
+
|
805
|
+
options.apply_defaults timeout: @config.rpcs.get_capacity_commitment.timeout,
|
806
|
+
metadata: metadata,
|
807
|
+
retry_policy: @config.rpcs.get_capacity_commitment.retry_policy
|
808
|
+
options.apply_defaults metadata: @config.metadata,
|
809
|
+
retry_policy: @config.retry_policy
|
810
|
+
|
811
|
+
@reservation_service_stub.call_rpc :get_capacity_commitment, request, options: options do |response, operation|
|
812
|
+
yield response, operation if block_given?
|
813
|
+
return response
|
814
|
+
end
|
815
|
+
rescue ::GRPC::BadStatus => e
|
816
|
+
raise ::Google::Cloud::Error.from_error(e)
|
817
|
+
end
|
818
|
+
|
819
|
+
##
|
820
|
+
# Deletes a capacity commitment. Attempting to delete capacity commitment
|
821
|
+
# before its commitment_end_time will fail with the error code
|
822
|
+
# `google.rpc.Code.FAILED_PRECONDITION`.
|
823
|
+
#
|
824
|
+
# @overload delete_capacity_commitment(request, options = nil)
|
825
|
+
# Pass arguments to `delete_capacity_commitment` via a request object, either of type
|
826
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash.
|
827
|
+
#
|
828
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash]
|
829
|
+
# A request object representing the call parameters. Required. To specify no
|
830
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
831
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
832
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
833
|
+
#
|
834
|
+
# @overload delete_capacity_commitment(name: nil)
|
835
|
+
# Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at
|
836
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
837
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
838
|
+
#
|
839
|
+
# @param name [::String]
|
840
|
+
# Required. Resource name of the capacity commitment to delete. E.g.,
|
841
|
+
# `projects/myproject/locations/US/capacityCommitments/123`
|
842
|
+
#
|
843
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
844
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
845
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
846
|
+
#
|
847
|
+
# @return [::Google::Protobuf::Empty]
|
848
|
+
#
|
849
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
850
|
+
#
|
851
|
+
def delete_capacity_commitment request, options = nil
|
852
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
853
|
+
|
854
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest
|
855
|
+
|
856
|
+
# Converts hash and nil to an options object
|
857
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
858
|
+
|
859
|
+
# Customize the options with defaults
|
860
|
+
metadata = @config.rpcs.delete_capacity_commitment.metadata.to_h
|
861
|
+
|
862
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
863
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
864
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
865
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
866
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
867
|
+
|
868
|
+
header_params = {
|
869
|
+
"name" => request.name
|
870
|
+
}
|
871
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
872
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
873
|
+
|
874
|
+
options.apply_defaults timeout: @config.rpcs.delete_capacity_commitment.timeout,
|
875
|
+
metadata: metadata,
|
876
|
+
retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy
|
877
|
+
options.apply_defaults metadata: @config.metadata,
|
878
|
+
retry_policy: @config.retry_policy
|
879
|
+
|
880
|
+
@reservation_service_stub.call_rpc :delete_capacity_commitment, request, options: options do |response, operation|
|
881
|
+
yield response, operation if block_given?
|
882
|
+
return response
|
883
|
+
end
|
884
|
+
rescue ::GRPC::BadStatus => e
|
885
|
+
raise ::Google::Cloud::Error.from_error(e)
|
886
|
+
end
|
887
|
+
|
888
|
+
##
|
889
|
+
# Updates an existing capacity commitment.
|
890
|
+
#
|
891
|
+
# Only `plan` and `renewal_plan` fields can be updated.
|
892
|
+
#
|
893
|
+
# Plan can only be changed to a plan of a longer commitment period.
|
894
|
+
# Attempting to change to a plan with shorter commitment period will fail
|
895
|
+
# with the error code `google.rpc.Code.FAILED_PRECONDITION`.
|
896
|
+
#
|
897
|
+
# @overload update_capacity_commitment(request, options = nil)
|
898
|
+
# Pass arguments to `update_capacity_commitment` via a request object, either of type
|
899
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash.
|
900
|
+
#
|
901
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash]
|
902
|
+
# A request object representing the call parameters. Required. To specify no
|
903
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
904
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
905
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
906
|
+
#
|
907
|
+
# @overload update_capacity_commitment(capacity_commitment: nil, update_mask: nil)
|
908
|
+
# Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at
|
909
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
910
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
911
|
+
#
|
912
|
+
# @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash]
|
913
|
+
# Content of the capacity commitment to update.
|
914
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
915
|
+
# Standard field mask for the set of fields to be updated.
|
916
|
+
#
|
917
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
918
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
919
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
920
|
+
#
|
921
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
922
|
+
#
|
923
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
924
|
+
#
|
925
|
+
def update_capacity_commitment request, options = nil
|
926
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
927
|
+
|
928
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest
|
929
|
+
|
930
|
+
# Converts hash and nil to an options object
|
931
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
932
|
+
|
933
|
+
# Customize the options with defaults
|
934
|
+
metadata = @config.rpcs.update_capacity_commitment.metadata.to_h
|
935
|
+
|
936
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
937
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
938
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
939
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
940
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
941
|
+
|
942
|
+
header_params = {
|
943
|
+
"capacity_commitment.name" => request.capacity_commitment.name
|
944
|
+
}
|
945
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
946
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
947
|
+
|
948
|
+
options.apply_defaults timeout: @config.rpcs.update_capacity_commitment.timeout,
|
949
|
+
metadata: metadata,
|
950
|
+
retry_policy: @config.rpcs.update_capacity_commitment.retry_policy
|
951
|
+
options.apply_defaults metadata: @config.metadata,
|
952
|
+
retry_policy: @config.retry_policy
|
953
|
+
|
954
|
+
@reservation_service_stub.call_rpc :update_capacity_commitment, request, options: options do |response, operation|
|
955
|
+
yield response, operation if block_given?
|
956
|
+
return response
|
957
|
+
end
|
958
|
+
rescue ::GRPC::BadStatus => e
|
959
|
+
raise ::Google::Cloud::Error.from_error(e)
|
960
|
+
end
|
961
|
+
|
962
|
+
##
|
963
|
+
# Splits capacity commitment to two commitments of the same plan and
|
964
|
+
# `commitment_end_time`.
|
965
|
+
#
|
966
|
+
# A common use case is to enable downgrading commitments.
|
967
|
+
#
|
968
|
+
# For example, in order to downgrade from 10000 slots to 8000, you might
|
969
|
+
# split a 10000 capacity commitment into commitments of 2000 and 8000. Then,
|
970
|
+
# you would change the plan of the first one to `FLEX` and then delete it.
|
971
|
+
#
|
972
|
+
# @overload split_capacity_commitment(request, options = nil)
|
973
|
+
# Pass arguments to `split_capacity_commitment` via a request object, either of type
|
974
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash.
|
975
|
+
#
|
976
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash]
|
977
|
+
# A request object representing the call parameters. Required. To specify no
|
978
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
979
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
980
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
981
|
+
#
|
982
|
+
# @overload split_capacity_commitment(name: nil, slot_count: nil)
|
983
|
+
# Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at
|
984
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
985
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
986
|
+
#
|
987
|
+
# @param name [::String]
|
988
|
+
# Required. The resource name e.g.,:
|
989
|
+
# `projects/myproject/locations/US/capacityCommitments/123`
|
990
|
+
# @param slot_count [::Integer]
|
991
|
+
# Number of slots in the capacity commitment after the split.
|
992
|
+
#
|
993
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
994
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse]
|
995
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
996
|
+
#
|
997
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse]
|
998
|
+
#
|
999
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1000
|
+
#
|
1001
|
+
def split_capacity_commitment request, options = nil
|
1002
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1003
|
+
|
1004
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest
|
1005
|
+
|
1006
|
+
# Converts hash and nil to an options object
|
1007
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1008
|
+
|
1009
|
+
# Customize the options with defaults
|
1010
|
+
metadata = @config.rpcs.split_capacity_commitment.metadata.to_h
|
1011
|
+
|
1012
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1013
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1014
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1015
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1016
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1017
|
+
|
1018
|
+
header_params = {
|
1019
|
+
"name" => request.name
|
1020
|
+
}
|
1021
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1022
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1023
|
+
|
1024
|
+
options.apply_defaults timeout: @config.rpcs.split_capacity_commitment.timeout,
|
1025
|
+
metadata: metadata,
|
1026
|
+
retry_policy: @config.rpcs.split_capacity_commitment.retry_policy
|
1027
|
+
options.apply_defaults metadata: @config.metadata,
|
1028
|
+
retry_policy: @config.retry_policy
|
1029
|
+
|
1030
|
+
@reservation_service_stub.call_rpc :split_capacity_commitment, request, options: options do |response, operation|
|
1031
|
+
yield response, operation if block_given?
|
1032
|
+
return response
|
1033
|
+
end
|
1034
|
+
rescue ::GRPC::BadStatus => e
|
1035
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
##
|
1039
|
+
# Merges capacity commitments of the same plan into a single commitment.
|
1040
|
+
#
|
1041
|
+
# The resulting capacity commitment has the greater commitment_end_time
|
1042
|
+
# out of the to-be-merged capacity commitments.
|
1043
|
+
#
|
1044
|
+
# Attempting to merge capacity commitments of different plan will fail
|
1045
|
+
# with the error code `google.rpc.Code.FAILED_PRECONDITION`.
|
1046
|
+
#
|
1047
|
+
# @overload merge_capacity_commitments(request, options = nil)
|
1048
|
+
# Pass arguments to `merge_capacity_commitments` via a request object, either of type
|
1049
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash.
|
1050
|
+
#
|
1051
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash]
|
1052
|
+
# A request object representing the call parameters. Required. To specify no
|
1053
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1054
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1055
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1056
|
+
#
|
1057
|
+
# @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil)
|
1058
|
+
# Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at
|
1059
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1060
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1061
|
+
#
|
1062
|
+
# @param parent [::String]
|
1063
|
+
# Parent resource that identifies admin project and location e.g.,
|
1064
|
+
# `projects/myproject/locations/us`
|
1065
|
+
# @param capacity_commitment_ids [::Array<::String>]
|
1066
|
+
# Ids of capacity commitments to merge.
|
1067
|
+
# These capacity commitments must exist under admin project and location
|
1068
|
+
# specified in the parent.
|
1069
|
+
# ID is the last portion of capacity commitment name e.g., 'abc' for
|
1070
|
+
# projects/myproject/locations/US/capacityCommitments/abc
|
1071
|
+
#
|
1072
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1073
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
1074
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1075
|
+
#
|
1076
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment]
|
1077
|
+
#
|
1078
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1079
|
+
#
|
1080
|
+
def merge_capacity_commitments request, options = nil
|
1081
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1082
|
+
|
1083
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest
|
1084
|
+
|
1085
|
+
# Converts hash and nil to an options object
|
1086
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1087
|
+
|
1088
|
+
# Customize the options with defaults
|
1089
|
+
metadata = @config.rpcs.merge_capacity_commitments.metadata.to_h
|
1090
|
+
|
1091
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1092
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1093
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1094
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1095
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1096
|
+
|
1097
|
+
header_params = {
|
1098
|
+
"parent" => request.parent
|
1099
|
+
}
|
1100
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1101
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1102
|
+
|
1103
|
+
options.apply_defaults timeout: @config.rpcs.merge_capacity_commitments.timeout,
|
1104
|
+
metadata: metadata,
|
1105
|
+
retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy
|
1106
|
+
options.apply_defaults metadata: @config.metadata,
|
1107
|
+
retry_policy: @config.retry_policy
|
1108
|
+
|
1109
|
+
@reservation_service_stub.call_rpc :merge_capacity_commitments, request, options: options do |response, operation|
|
1110
|
+
yield response, operation if block_given?
|
1111
|
+
return response
|
1112
|
+
end
|
1113
|
+
rescue ::GRPC::BadStatus => e
|
1114
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
##
|
1118
|
+
# Creates an assignment object which allows the given project to submit jobs
|
1119
|
+
# of a certain type using slots from the specified reservation.
|
1120
|
+
#
|
1121
|
+
# Currently a
|
1122
|
+
# resource (project, folder, organization) can only have one assignment per
|
1123
|
+
# each (job_type, location) combination, and that reservation will be used
|
1124
|
+
# for all jobs of the matching type.
|
1125
|
+
#
|
1126
|
+
# Different assignments can be created on different levels of the
|
1127
|
+
# projects, folders or organization hierarchy. During query execution,
|
1128
|
+
# the assignment is looked up at the project, folder and organization levels
|
1129
|
+
# in that order. The first assignment found is applied to the query.
|
1130
|
+
#
|
1131
|
+
# When creating assignments, it does not matter if other assignments exist at
|
1132
|
+
# higher levels.
|
1133
|
+
#
|
1134
|
+
# Example:
|
1135
|
+
#
|
1136
|
+
# * The organization `organizationA` contains two projects, `project1`
|
1137
|
+
# and `project2`.
|
1138
|
+
# * Assignments for all three entities (`organizationA`, `project1`, and
|
1139
|
+
# `project2`) could all be created and mapped to the same or different
|
1140
|
+
# reservations.
|
1141
|
+
#
|
1142
|
+
# Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
|
1143
|
+
# 'bigquery.admin' permissions on the project using the reservation
|
1144
|
+
# and the project that owns this reservation.
|
1145
|
+
#
|
1146
|
+
# Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment
|
1147
|
+
# does not match location of the reservation.
|
1148
|
+
#
|
1149
|
+
# @overload create_assignment(request, options = nil)
|
1150
|
+
# Pass arguments to `create_assignment` via a request object, either of type
|
1151
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash.
|
1152
|
+
#
|
1153
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash]
|
1154
|
+
# A request object representing the call parameters. Required. To specify no
|
1155
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1156
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1157
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1158
|
+
#
|
1159
|
+
# @overload create_assignment(parent: nil, assignment: nil)
|
1160
|
+
# Pass arguments to `create_assignment` via keyword arguments. Note that at
|
1161
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1162
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1163
|
+
#
|
1164
|
+
# @param parent [::String]
|
1165
|
+
# Required. The parent resource name of the assignment
|
1166
|
+
# E.g. `projects/myproject/locations/US/reservations/team1-prod`
|
1167
|
+
# @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash]
|
1168
|
+
# Assignment resource to create.
|
1169
|
+
#
|
1170
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1171
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
|
1172
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1173
|
+
#
|
1174
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
|
1175
|
+
#
|
1176
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1177
|
+
#
|
1178
|
+
def create_assignment request, options = nil
|
1179
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1180
|
+
|
1181
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest
|
1182
|
+
|
1183
|
+
# Converts hash and nil to an options object
|
1184
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1185
|
+
|
1186
|
+
# Customize the options with defaults
|
1187
|
+
metadata = @config.rpcs.create_assignment.metadata.to_h
|
1188
|
+
|
1189
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1190
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1191
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1192
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1193
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1194
|
+
|
1195
|
+
header_params = {
|
1196
|
+
"parent" => request.parent
|
1197
|
+
}
|
1198
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1199
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1200
|
+
|
1201
|
+
options.apply_defaults timeout: @config.rpcs.create_assignment.timeout,
|
1202
|
+
metadata: metadata,
|
1203
|
+
retry_policy: @config.rpcs.create_assignment.retry_policy
|
1204
|
+
options.apply_defaults metadata: @config.metadata,
|
1205
|
+
retry_policy: @config.retry_policy
|
1206
|
+
|
1207
|
+
@reservation_service_stub.call_rpc :create_assignment, request, options: options do |response, operation|
|
1208
|
+
yield response, operation if block_given?
|
1209
|
+
return response
|
1210
|
+
end
|
1211
|
+
rescue ::GRPC::BadStatus => e
|
1212
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1213
|
+
end
|
1214
|
+
|
1215
|
+
##
|
1216
|
+
# Lists assignments.
|
1217
|
+
#
|
1218
|
+
# Only explicitly created assignments will be returned.
|
1219
|
+
#
|
1220
|
+
# Example:
|
1221
|
+
#
|
1222
|
+
# * Organization `organizationA` contains two projects, `project1` and
|
1223
|
+
# `project2`.
|
1224
|
+
# * Reservation `res1` exists and was created previously.
|
1225
|
+
# * CreateAssignment was used previously to define the following
|
1226
|
+
# associations between entities and reservations: `<organizationA, res1>`
|
1227
|
+
# and `<project1, res1>`
|
1228
|
+
#
|
1229
|
+
# In this example, ListAssignments will just return the above two assignments
|
1230
|
+
# for reservation `res1`, and no expansion/merge will happen.
|
1231
|
+
#
|
1232
|
+
# The wildcard "-" can be used for
|
1233
|
+
# reservations in the request. In that case all assignments belongs to the
|
1234
|
+
# specified project and location will be listed.
|
1235
|
+
#
|
1236
|
+
# **Note** "-" cannot be used for projects nor locations.
|
1237
|
+
#
|
1238
|
+
# @overload list_assignments(request, options = nil)
|
1239
|
+
# Pass arguments to `list_assignments` via a request object, either of type
|
1240
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash.
|
1241
|
+
#
|
1242
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash]
|
1243
|
+
# A request object representing the call parameters. Required. To specify no
|
1244
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1245
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1246
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1247
|
+
#
|
1248
|
+
# @overload list_assignments(parent: nil, page_size: nil, page_token: nil)
|
1249
|
+
# Pass arguments to `list_assignments` via keyword arguments. Note that at
|
1250
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1251
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1252
|
+
#
|
1253
|
+
# @param parent [::String]
|
1254
|
+
# Required. The parent resource name e.g.:
|
1255
|
+
#
|
1256
|
+
# `projects/myproject/locations/US/reservations/team1-prod`
|
1257
|
+
#
|
1258
|
+
# Or:
|
1259
|
+
#
|
1260
|
+
# `projects/myproject/locations/US/reservations/-`
|
1261
|
+
# @param page_size [::Integer]
|
1262
|
+
# The maximum number of items to return per page.
|
1263
|
+
# @param page_token [::String]
|
1264
|
+
# The next_page_token value returned from a previous List request, if any.
|
1265
|
+
#
|
1266
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1267
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
|
1268
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1269
|
+
#
|
1270
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
|
1271
|
+
#
|
1272
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1273
|
+
#
|
1274
|
+
def list_assignments request, options = nil
|
1275
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1276
|
+
|
1277
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest
|
1278
|
+
|
1279
|
+
# Converts hash and nil to an options object
|
1280
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1281
|
+
|
1282
|
+
# Customize the options with defaults
|
1283
|
+
metadata = @config.rpcs.list_assignments.metadata.to_h
|
1284
|
+
|
1285
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1286
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1287
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1288
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1289
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1290
|
+
|
1291
|
+
header_params = {
|
1292
|
+
"parent" => request.parent
|
1293
|
+
}
|
1294
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1295
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1296
|
+
|
1297
|
+
options.apply_defaults timeout: @config.rpcs.list_assignments.timeout,
|
1298
|
+
metadata: metadata,
|
1299
|
+
retry_policy: @config.rpcs.list_assignments.retry_policy
|
1300
|
+
options.apply_defaults metadata: @config.metadata,
|
1301
|
+
retry_policy: @config.retry_policy
|
1302
|
+
|
1303
|
+
@reservation_service_stub.call_rpc :list_assignments, request, options: options do |response, operation|
|
1304
|
+
response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_assignments, request, response, operation, options
|
1305
|
+
yield response, operation if block_given?
|
1306
|
+
return response
|
1307
|
+
end
|
1308
|
+
rescue ::GRPC::BadStatus => e
|
1309
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
##
|
1313
|
+
# Deletes a assignment. No expansion will happen.
|
1314
|
+
#
|
1315
|
+
# Example:
|
1316
|
+
#
|
1317
|
+
# * Organization `organizationA` contains two projects, `project1` and
|
1318
|
+
# `project2`.
|
1319
|
+
# * Reservation `res1` exists and was created previously.
|
1320
|
+
# * CreateAssignment was used previously to define the following
|
1321
|
+
# associations between entities and reservations: `<organizationA, res1>`
|
1322
|
+
# and `<project1, res1>`
|
1323
|
+
#
|
1324
|
+
# In this example, deletion of the `<organizationA, res1>` assignment won't
|
1325
|
+
# affect the other assignment `<project1, res1>`. After said deletion,
|
1326
|
+
# queries from `project1` will still use `res1` while queries from
|
1327
|
+
# `project2` will switch to use on-demand mode.
|
1328
|
+
#
|
1329
|
+
# @overload delete_assignment(request, options = nil)
|
1330
|
+
# Pass arguments to `delete_assignment` via a request object, either of type
|
1331
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash.
|
1332
|
+
#
|
1333
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash]
|
1334
|
+
# A request object representing the call parameters. Required. To specify no
|
1335
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1336
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1337
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1338
|
+
#
|
1339
|
+
# @overload delete_assignment(name: nil)
|
1340
|
+
# Pass arguments to `delete_assignment` via keyword arguments. Note that at
|
1341
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1342
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1343
|
+
#
|
1344
|
+
# @param name [::String]
|
1345
|
+
# Required. Name of the resource, e.g.
|
1346
|
+
# `projects/myproject/locations/US/reservations/team1-prod/assignments/123`
|
1347
|
+
#
|
1348
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1349
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1350
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1351
|
+
#
|
1352
|
+
# @return [::Google::Protobuf::Empty]
|
1353
|
+
#
|
1354
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1355
|
+
#
|
1356
|
+
def delete_assignment request, options = nil
|
1357
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1358
|
+
|
1359
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest
|
1360
|
+
|
1361
|
+
# Converts hash and nil to an options object
|
1362
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1363
|
+
|
1364
|
+
# Customize the options with defaults
|
1365
|
+
metadata = @config.rpcs.delete_assignment.metadata.to_h
|
1366
|
+
|
1367
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1368
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1369
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1370
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1371
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1372
|
+
|
1373
|
+
header_params = {
|
1374
|
+
"name" => request.name
|
1375
|
+
}
|
1376
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1377
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1378
|
+
|
1379
|
+
options.apply_defaults timeout: @config.rpcs.delete_assignment.timeout,
|
1380
|
+
metadata: metadata,
|
1381
|
+
retry_policy: @config.rpcs.delete_assignment.retry_policy
|
1382
|
+
options.apply_defaults metadata: @config.metadata,
|
1383
|
+
retry_policy: @config.retry_policy
|
1384
|
+
|
1385
|
+
@reservation_service_stub.call_rpc :delete_assignment, request, options: options do |response, operation|
|
1386
|
+
yield response, operation if block_given?
|
1387
|
+
return response
|
1388
|
+
end
|
1389
|
+
rescue ::GRPC::BadStatus => e
|
1390
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1391
|
+
end
|
1392
|
+
|
1393
|
+
##
|
1394
|
+
# Looks up assignments for a specified resource for a particular region.
|
1395
|
+
# If the request is about a project:
|
1396
|
+
#
|
1397
|
+
# 1. Assignments created on the project will be returned if they exist.
|
1398
|
+
# 2. Otherwise assignments created on the closest ancestor will be
|
1399
|
+
# returned.
|
1400
|
+
# 3. Assignments for different JobTypes will all be returned.
|
1401
|
+
#
|
1402
|
+
# The same logic applies if the request is about a folder.
|
1403
|
+
#
|
1404
|
+
# If the request is about an organization, then assignments created on the
|
1405
|
+
# organization will be returned (organization doesn't have ancestors).
|
1406
|
+
#
|
1407
|
+
# Comparing to ListAssignments, there are some behavior
|
1408
|
+
# differences:
|
1409
|
+
#
|
1410
|
+
# 1. permission on the assignee will be verified in this API.
|
1411
|
+
# 2. Hierarchy lookup (project->folder->organization) happens in this API.
|
1412
|
+
# 3. Parent here is `projects/*/locations/*`, instead of
|
1413
|
+
# `projects/*/locations/*reservations/*`.
|
1414
|
+
#
|
1415
|
+
# **Note** "-" cannot be used for projects
|
1416
|
+
# nor locations.
|
1417
|
+
#
|
1418
|
+
# @overload search_assignments(request, options = nil)
|
1419
|
+
# Pass arguments to `search_assignments` via a request object, either of type
|
1420
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash.
|
1421
|
+
#
|
1422
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash]
|
1423
|
+
# A request object representing the call parameters. Required. To specify no
|
1424
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1425
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1426
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1427
|
+
#
|
1428
|
+
# @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil)
|
1429
|
+
# Pass arguments to `search_assignments` via keyword arguments. Note that at
|
1430
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1431
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1432
|
+
#
|
1433
|
+
# @param parent [::String]
|
1434
|
+
# Required. The resource name of the admin project(containing project and location),
|
1435
|
+
# e.g.:
|
1436
|
+
# `projects/myproject/locations/US`.
|
1437
|
+
# @param query [::String]
|
1438
|
+
# Please specify resource name as assignee in the query.
|
1439
|
+
#
|
1440
|
+
# Examples:
|
1441
|
+
#
|
1442
|
+
# * `assignee=projects/myproject`
|
1443
|
+
# * `assignee=folders/123`
|
1444
|
+
# * `assignee=organizations/456`
|
1445
|
+
# @param page_size [::Integer]
|
1446
|
+
# The maximum number of items to return per page.
|
1447
|
+
# @param page_token [::String]
|
1448
|
+
# The next_page_token value returned from a previous List request, if any.
|
1449
|
+
#
|
1450
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1451
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
|
1452
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1453
|
+
#
|
1454
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>]
|
1455
|
+
#
|
1456
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1457
|
+
#
|
1458
|
+
def search_assignments request, options = nil
|
1459
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1460
|
+
|
1461
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest
|
1462
|
+
|
1463
|
+
# Converts hash and nil to an options object
|
1464
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1465
|
+
|
1466
|
+
# Customize the options with defaults
|
1467
|
+
metadata = @config.rpcs.search_assignments.metadata.to_h
|
1468
|
+
|
1469
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1470
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1471
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1472
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1473
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1474
|
+
|
1475
|
+
header_params = {
|
1476
|
+
"parent" => request.parent
|
1477
|
+
}
|
1478
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1479
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1480
|
+
|
1481
|
+
options.apply_defaults timeout: @config.rpcs.search_assignments.timeout,
|
1482
|
+
metadata: metadata,
|
1483
|
+
retry_policy: @config.rpcs.search_assignments.retry_policy
|
1484
|
+
options.apply_defaults metadata: @config.metadata,
|
1485
|
+
retry_policy: @config.retry_policy
|
1486
|
+
|
1487
|
+
@reservation_service_stub.call_rpc :search_assignments, request, options: options do |response, operation|
|
1488
|
+
response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_assignments, request, response, operation, options
|
1489
|
+
yield response, operation if block_given?
|
1490
|
+
return response
|
1491
|
+
end
|
1492
|
+
rescue ::GRPC::BadStatus => e
|
1493
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
##
|
1497
|
+
# Moves an assignment under a new reservation.
|
1498
|
+
#
|
1499
|
+
# This differs from removing an existing assignment and recreating a new one
|
1500
|
+
# by providing a transactional change that ensures an assignee always has an
|
1501
|
+
# associated reservation.
|
1502
|
+
#
|
1503
|
+
# @overload move_assignment(request, options = nil)
|
1504
|
+
# Pass arguments to `move_assignment` via a request object, either of type
|
1505
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash.
|
1506
|
+
#
|
1507
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash]
|
1508
|
+
# A request object representing the call parameters. Required. To specify no
|
1509
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1510
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1511
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1512
|
+
#
|
1513
|
+
# @overload move_assignment(name: nil, destination_id: nil)
|
1514
|
+
# Pass arguments to `move_assignment` via keyword arguments. Note that at
|
1515
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1516
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1517
|
+
#
|
1518
|
+
# @param name [::String]
|
1519
|
+
# Required. The resource name of the assignment,
|
1520
|
+
# e.g.
|
1521
|
+
# `projects/myproject/locations/US/reservations/team1-prod/assignments/123`
|
1522
|
+
# @param destination_id [::String]
|
1523
|
+
# The new reservation ID, e.g.:
|
1524
|
+
# `projects/myotherproject/locations/US/reservations/team2-prod`
|
1525
|
+
#
|
1526
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1527
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
|
1528
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1529
|
+
#
|
1530
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
|
1531
|
+
#
|
1532
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1533
|
+
#
|
1534
|
+
def move_assignment request, options = nil
|
1535
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1536
|
+
|
1537
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest
|
1538
|
+
|
1539
|
+
# Converts hash and nil to an options object
|
1540
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1541
|
+
|
1542
|
+
# Customize the options with defaults
|
1543
|
+
metadata = @config.rpcs.move_assignment.metadata.to_h
|
1544
|
+
|
1545
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1546
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1547
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1548
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1549
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1550
|
+
|
1551
|
+
header_params = {
|
1552
|
+
"name" => request.name
|
1553
|
+
}
|
1554
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1555
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1556
|
+
|
1557
|
+
options.apply_defaults timeout: @config.rpcs.move_assignment.timeout,
|
1558
|
+
metadata: metadata,
|
1559
|
+
retry_policy: @config.rpcs.move_assignment.retry_policy
|
1560
|
+
options.apply_defaults metadata: @config.metadata,
|
1561
|
+
retry_policy: @config.retry_policy
|
1562
|
+
|
1563
|
+
@reservation_service_stub.call_rpc :move_assignment, request, options: options do |response, operation|
|
1564
|
+
yield response, operation if block_given?
|
1565
|
+
return response
|
1566
|
+
end
|
1567
|
+
rescue ::GRPC::BadStatus => e
|
1568
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1569
|
+
end
|
1570
|
+
|
1571
|
+
##
|
1572
|
+
# Retrieves a BI reservation.
|
1573
|
+
#
|
1574
|
+
# @overload get_bi_reservation(request, options = nil)
|
1575
|
+
# Pass arguments to `get_bi_reservation` via a request object, either of type
|
1576
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash.
|
1577
|
+
#
|
1578
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash]
|
1579
|
+
# A request object representing the call parameters. Required. To specify no
|
1580
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1581
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1582
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1583
|
+
#
|
1584
|
+
# @overload get_bi_reservation(name: nil)
|
1585
|
+
# Pass arguments to `get_bi_reservation` via keyword arguments. Note that at
|
1586
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1587
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1588
|
+
#
|
1589
|
+
# @param name [::String]
|
1590
|
+
# Required. Name of the requested reservation, for example:
|
1591
|
+
# `projects/{project_id}/locations/{location_id}/bireservation`
|
1592
|
+
#
|
1593
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1594
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation]
|
1595
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1596
|
+
#
|
1597
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation]
|
1598
|
+
#
|
1599
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1600
|
+
#
|
1601
|
+
def get_bi_reservation request, options = nil
|
1602
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1603
|
+
|
1604
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest
|
1605
|
+
|
1606
|
+
# Converts hash and nil to an options object
|
1607
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1608
|
+
|
1609
|
+
# Customize the options with defaults
|
1610
|
+
metadata = @config.rpcs.get_bi_reservation.metadata.to_h
|
1611
|
+
|
1612
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1613
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1614
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1615
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1616
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1617
|
+
|
1618
|
+
header_params = {
|
1619
|
+
"name" => request.name
|
1620
|
+
}
|
1621
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1622
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1623
|
+
|
1624
|
+
options.apply_defaults timeout: @config.rpcs.get_bi_reservation.timeout,
|
1625
|
+
metadata: metadata,
|
1626
|
+
retry_policy: @config.rpcs.get_bi_reservation.retry_policy
|
1627
|
+
options.apply_defaults metadata: @config.metadata,
|
1628
|
+
retry_policy: @config.retry_policy
|
1629
|
+
|
1630
|
+
@reservation_service_stub.call_rpc :get_bi_reservation, request, options: options do |response, operation|
|
1631
|
+
yield response, operation if block_given?
|
1632
|
+
return response
|
1633
|
+
end
|
1634
|
+
rescue ::GRPC::BadStatus => e
|
1635
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1636
|
+
end
|
1637
|
+
|
1638
|
+
##
|
1639
|
+
# Updates a BI reservation.
|
1640
|
+
#
|
1641
|
+
# Only fields specified in the `field_mask` are updated.
|
1642
|
+
#
|
1643
|
+
# A singleton BI reservation always exists with default size 0.
|
1644
|
+
# In order to reserve BI capacity it needs to be updated to an amount
|
1645
|
+
# greater than 0. In order to release BI capacity reservation size
|
1646
|
+
# must be set to 0.
|
1647
|
+
#
|
1648
|
+
# @overload update_bi_reservation(request, options = nil)
|
1649
|
+
# Pass arguments to `update_bi_reservation` via a request object, either of type
|
1650
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash.
|
1651
|
+
#
|
1652
|
+
# @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash]
|
1653
|
+
# A request object representing the call parameters. Required. To specify no
|
1654
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1655
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1656
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1657
|
+
#
|
1658
|
+
# @overload update_bi_reservation(bi_reservation: nil, update_mask: nil)
|
1659
|
+
# Pass arguments to `update_bi_reservation` via keyword arguments. Note that at
|
1660
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1661
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1662
|
+
#
|
1663
|
+
# @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash]
|
1664
|
+
# A reservation to update.
|
1665
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1666
|
+
# A list of fields to be updated in this request.
|
1667
|
+
#
|
1668
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1669
|
+
# @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation]
|
1670
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1671
|
+
#
|
1672
|
+
# @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation]
|
1673
|
+
#
|
1674
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1675
|
+
#
|
1676
|
+
def update_bi_reservation request, options = nil
|
1677
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1678
|
+
|
1679
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest
|
1680
|
+
|
1681
|
+
# Converts hash and nil to an options object
|
1682
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1683
|
+
|
1684
|
+
# Customize the options with defaults
|
1685
|
+
metadata = @config.rpcs.update_bi_reservation.metadata.to_h
|
1686
|
+
|
1687
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1688
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1689
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1690
|
+
gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
|
1691
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1692
|
+
|
1693
|
+
header_params = {
|
1694
|
+
"bi_reservation.name" => request.bi_reservation.name
|
1695
|
+
}
|
1696
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1697
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1698
|
+
|
1699
|
+
options.apply_defaults timeout: @config.rpcs.update_bi_reservation.timeout,
|
1700
|
+
metadata: metadata,
|
1701
|
+
retry_policy: @config.rpcs.update_bi_reservation.retry_policy
|
1702
|
+
options.apply_defaults metadata: @config.metadata,
|
1703
|
+
retry_policy: @config.retry_policy
|
1704
|
+
|
1705
|
+
@reservation_service_stub.call_rpc :update_bi_reservation, request, options: options do |response, operation|
|
1706
|
+
yield response, operation if block_given?
|
1707
|
+
return response
|
1708
|
+
end
|
1709
|
+
rescue ::GRPC::BadStatus => e
|
1710
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1711
|
+
end
|
1712
|
+
|
1713
|
+
##
|
1714
|
+
# Configuration class for the ReservationService API.
|
1715
|
+
#
|
1716
|
+
# This class represents the configuration for ReservationService,
|
1717
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1718
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1719
|
+
# applied individually to specific RPCs. See
|
1720
|
+
# {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration::Rpcs}
|
1721
|
+
# for a list of RPCs that can be configured independently.
|
1722
|
+
#
|
1723
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1724
|
+
# on construction.
|
1725
|
+
#
|
1726
|
+
# # Examples
|
1727
|
+
#
|
1728
|
+
# To modify the global config, setting the timeout for create_reservation
|
1729
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1730
|
+
#
|
1731
|
+
# ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config|
|
1732
|
+
# config.timeout = 10.0
|
1733
|
+
# config.rpcs.create_reservation.timeout = 20.0
|
1734
|
+
# end
|
1735
|
+
#
|
1736
|
+
# To apply the above configuration only to a new client:
|
1737
|
+
#
|
1738
|
+
# client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config|
|
1739
|
+
# config.timeout = 10.0
|
1740
|
+
# config.rpcs.create_reservation.timeout = 20.0
|
1741
|
+
# end
|
1742
|
+
#
|
1743
|
+
# @!attribute [rw] endpoint
|
1744
|
+
# The hostname or hostname:port of the service endpoint.
|
1745
|
+
# Defaults to `"bigqueryreservation.googleapis.com"`.
|
1746
|
+
# @return [::String]
|
1747
|
+
# @!attribute [rw] credentials
|
1748
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1749
|
+
# * (`String`) The path to a service account key file in JSON format
|
1750
|
+
# * (`Hash`) A service account key as a Hash
|
1751
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1752
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1753
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1754
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1755
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1756
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1757
|
+
# * (`nil`) indicating no credentials
|
1758
|
+
# @return [::Object]
|
1759
|
+
# @!attribute [rw] scope
|
1760
|
+
# The OAuth scopes
|
1761
|
+
# @return [::Array<::String>]
|
1762
|
+
# @!attribute [rw] lib_name
|
1763
|
+
# The library name as recorded in instrumentation and logging
|
1764
|
+
# @return [::String]
|
1765
|
+
# @!attribute [rw] lib_version
|
1766
|
+
# The library version as recorded in instrumentation and logging
|
1767
|
+
# @return [::String]
|
1768
|
+
# @!attribute [rw] channel_args
|
1769
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1770
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1771
|
+
# @return [::Hash]
|
1772
|
+
# @!attribute [rw] interceptors
|
1773
|
+
# An array of interceptors that are run before calls are executed.
|
1774
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1775
|
+
# @!attribute [rw] timeout
|
1776
|
+
# The call timeout in seconds.
|
1777
|
+
# @return [::Numeric]
|
1778
|
+
# @!attribute [rw] metadata
|
1779
|
+
# Additional gRPC headers to be sent with the call.
|
1780
|
+
# @return [::Hash{::Symbol=>::String}]
|
1781
|
+
# @!attribute [rw] retry_policy
|
1782
|
+
# The retry policy. The value is a hash with the following keys:
|
1783
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1784
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1785
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1786
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1787
|
+
# trigger a retry.
|
1788
|
+
# @return [::Hash]
|
1789
|
+
# @!attribute [rw] quota_project
|
1790
|
+
# A separate project against which to charge quota.
|
1791
|
+
# @return [::String]
|
1792
|
+
#
|
1793
|
+
class Configuration
|
1794
|
+
extend ::Gapic::Config
|
1795
|
+
|
1796
|
+
config_attr :endpoint, "bigqueryreservation.googleapis.com", ::String
|
1797
|
+
config_attr :credentials, nil do |value|
|
1798
|
+
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1799
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1800
|
+
allowed.any? { |klass| klass === value }
|
1801
|
+
end
|
1802
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1803
|
+
config_attr :lib_name, nil, ::String, nil
|
1804
|
+
config_attr :lib_version, nil, ::String, nil
|
1805
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1806
|
+
config_attr :interceptors, nil, ::Array, nil
|
1807
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1808
|
+
config_attr :metadata, nil, ::Hash, nil
|
1809
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1810
|
+
config_attr :quota_project, nil, ::String, nil
|
1811
|
+
|
1812
|
+
# @private
|
1813
|
+
def initialize parent_config = nil
|
1814
|
+
@parent_config = parent_config unless parent_config.nil?
|
1815
|
+
|
1816
|
+
yield self if block_given?
|
1817
|
+
end
|
1818
|
+
|
1819
|
+
##
|
1820
|
+
# Configurations for individual RPCs
|
1821
|
+
# @return [Rpcs]
|
1822
|
+
#
|
1823
|
+
def rpcs
|
1824
|
+
@rpcs ||= begin
|
1825
|
+
parent_rpcs = nil
|
1826
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
1827
|
+
Rpcs.new parent_rpcs
|
1828
|
+
end
|
1829
|
+
end
|
1830
|
+
|
1831
|
+
##
|
1832
|
+
# Configuration RPC class for the ReservationService API.
|
1833
|
+
#
|
1834
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1835
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1836
|
+
# the following configuration fields:
|
1837
|
+
#
|
1838
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
|
1839
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1840
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1841
|
+
# include the following keys:
|
1842
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1843
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1844
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1845
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1846
|
+
# trigger a retry.
|
1847
|
+
#
|
1848
|
+
class Rpcs
|
1849
|
+
##
|
1850
|
+
# RPC-specific configuration for `create_reservation`
|
1851
|
+
# @return [::Gapic::Config::Method]
|
1852
|
+
#
|
1853
|
+
attr_reader :create_reservation
|
1854
|
+
##
|
1855
|
+
# RPC-specific configuration for `list_reservations`
|
1856
|
+
# @return [::Gapic::Config::Method]
|
1857
|
+
#
|
1858
|
+
attr_reader :list_reservations
|
1859
|
+
##
|
1860
|
+
# RPC-specific configuration for `get_reservation`
|
1861
|
+
# @return [::Gapic::Config::Method]
|
1862
|
+
#
|
1863
|
+
attr_reader :get_reservation
|
1864
|
+
##
|
1865
|
+
# RPC-specific configuration for `delete_reservation`
|
1866
|
+
# @return [::Gapic::Config::Method]
|
1867
|
+
#
|
1868
|
+
attr_reader :delete_reservation
|
1869
|
+
##
|
1870
|
+
# RPC-specific configuration for `update_reservation`
|
1871
|
+
# @return [::Gapic::Config::Method]
|
1872
|
+
#
|
1873
|
+
attr_reader :update_reservation
|
1874
|
+
##
|
1875
|
+
# RPC-specific configuration for `create_capacity_commitment`
|
1876
|
+
# @return [::Gapic::Config::Method]
|
1877
|
+
#
|
1878
|
+
attr_reader :create_capacity_commitment
|
1879
|
+
##
|
1880
|
+
# RPC-specific configuration for `list_capacity_commitments`
|
1881
|
+
# @return [::Gapic::Config::Method]
|
1882
|
+
#
|
1883
|
+
attr_reader :list_capacity_commitments
|
1884
|
+
##
|
1885
|
+
# RPC-specific configuration for `get_capacity_commitment`
|
1886
|
+
# @return [::Gapic::Config::Method]
|
1887
|
+
#
|
1888
|
+
attr_reader :get_capacity_commitment
|
1889
|
+
##
|
1890
|
+
# RPC-specific configuration for `delete_capacity_commitment`
|
1891
|
+
# @return [::Gapic::Config::Method]
|
1892
|
+
#
|
1893
|
+
attr_reader :delete_capacity_commitment
|
1894
|
+
##
|
1895
|
+
# RPC-specific configuration for `update_capacity_commitment`
|
1896
|
+
# @return [::Gapic::Config::Method]
|
1897
|
+
#
|
1898
|
+
attr_reader :update_capacity_commitment
|
1899
|
+
##
|
1900
|
+
# RPC-specific configuration for `split_capacity_commitment`
|
1901
|
+
# @return [::Gapic::Config::Method]
|
1902
|
+
#
|
1903
|
+
attr_reader :split_capacity_commitment
|
1904
|
+
##
|
1905
|
+
# RPC-specific configuration for `merge_capacity_commitments`
|
1906
|
+
# @return [::Gapic::Config::Method]
|
1907
|
+
#
|
1908
|
+
attr_reader :merge_capacity_commitments
|
1909
|
+
##
|
1910
|
+
# RPC-specific configuration for `create_assignment`
|
1911
|
+
# @return [::Gapic::Config::Method]
|
1912
|
+
#
|
1913
|
+
attr_reader :create_assignment
|
1914
|
+
##
|
1915
|
+
# RPC-specific configuration for `list_assignments`
|
1916
|
+
# @return [::Gapic::Config::Method]
|
1917
|
+
#
|
1918
|
+
attr_reader :list_assignments
|
1919
|
+
##
|
1920
|
+
# RPC-specific configuration for `delete_assignment`
|
1921
|
+
# @return [::Gapic::Config::Method]
|
1922
|
+
#
|
1923
|
+
attr_reader :delete_assignment
|
1924
|
+
##
|
1925
|
+
# RPC-specific configuration for `search_assignments`
|
1926
|
+
# @return [::Gapic::Config::Method]
|
1927
|
+
#
|
1928
|
+
attr_reader :search_assignments
|
1929
|
+
##
|
1930
|
+
# RPC-specific configuration for `move_assignment`
|
1931
|
+
# @return [::Gapic::Config::Method]
|
1932
|
+
#
|
1933
|
+
attr_reader :move_assignment
|
1934
|
+
##
|
1935
|
+
# RPC-specific configuration for `get_bi_reservation`
|
1936
|
+
# @return [::Gapic::Config::Method]
|
1937
|
+
#
|
1938
|
+
attr_reader :get_bi_reservation
|
1939
|
+
##
|
1940
|
+
# RPC-specific configuration for `update_bi_reservation`
|
1941
|
+
# @return [::Gapic::Config::Method]
|
1942
|
+
#
|
1943
|
+
attr_reader :update_bi_reservation
|
1944
|
+
|
1945
|
+
# @private
|
1946
|
+
def initialize parent_rpcs = nil
|
1947
|
+
create_reservation_config = parent_rpcs&.create_reservation if parent_rpcs&.respond_to? :create_reservation
|
1948
|
+
@create_reservation = ::Gapic::Config::Method.new create_reservation_config
|
1949
|
+
list_reservations_config = parent_rpcs&.list_reservations if parent_rpcs&.respond_to? :list_reservations
|
1950
|
+
@list_reservations = ::Gapic::Config::Method.new list_reservations_config
|
1951
|
+
get_reservation_config = parent_rpcs&.get_reservation if parent_rpcs&.respond_to? :get_reservation
|
1952
|
+
@get_reservation = ::Gapic::Config::Method.new get_reservation_config
|
1953
|
+
delete_reservation_config = parent_rpcs&.delete_reservation if parent_rpcs&.respond_to? :delete_reservation
|
1954
|
+
@delete_reservation = ::Gapic::Config::Method.new delete_reservation_config
|
1955
|
+
update_reservation_config = parent_rpcs&.update_reservation if parent_rpcs&.respond_to? :update_reservation
|
1956
|
+
@update_reservation = ::Gapic::Config::Method.new update_reservation_config
|
1957
|
+
create_capacity_commitment_config = parent_rpcs&.create_capacity_commitment if parent_rpcs&.respond_to? :create_capacity_commitment
|
1958
|
+
@create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config
|
1959
|
+
list_capacity_commitments_config = parent_rpcs&.list_capacity_commitments if parent_rpcs&.respond_to? :list_capacity_commitments
|
1960
|
+
@list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config
|
1961
|
+
get_capacity_commitment_config = parent_rpcs&.get_capacity_commitment if parent_rpcs&.respond_to? :get_capacity_commitment
|
1962
|
+
@get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config
|
1963
|
+
delete_capacity_commitment_config = parent_rpcs&.delete_capacity_commitment if parent_rpcs&.respond_to? :delete_capacity_commitment
|
1964
|
+
@delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config
|
1965
|
+
update_capacity_commitment_config = parent_rpcs&.update_capacity_commitment if parent_rpcs&.respond_to? :update_capacity_commitment
|
1966
|
+
@update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config
|
1967
|
+
split_capacity_commitment_config = parent_rpcs&.split_capacity_commitment if parent_rpcs&.respond_to? :split_capacity_commitment
|
1968
|
+
@split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config
|
1969
|
+
merge_capacity_commitments_config = parent_rpcs&.merge_capacity_commitments if parent_rpcs&.respond_to? :merge_capacity_commitments
|
1970
|
+
@merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config
|
1971
|
+
create_assignment_config = parent_rpcs&.create_assignment if parent_rpcs&.respond_to? :create_assignment
|
1972
|
+
@create_assignment = ::Gapic::Config::Method.new create_assignment_config
|
1973
|
+
list_assignments_config = parent_rpcs&.list_assignments if parent_rpcs&.respond_to? :list_assignments
|
1974
|
+
@list_assignments = ::Gapic::Config::Method.new list_assignments_config
|
1975
|
+
delete_assignment_config = parent_rpcs&.delete_assignment if parent_rpcs&.respond_to? :delete_assignment
|
1976
|
+
@delete_assignment = ::Gapic::Config::Method.new delete_assignment_config
|
1977
|
+
search_assignments_config = parent_rpcs&.search_assignments if parent_rpcs&.respond_to? :search_assignments
|
1978
|
+
@search_assignments = ::Gapic::Config::Method.new search_assignments_config
|
1979
|
+
move_assignment_config = parent_rpcs&.move_assignment if parent_rpcs&.respond_to? :move_assignment
|
1980
|
+
@move_assignment = ::Gapic::Config::Method.new move_assignment_config
|
1981
|
+
get_bi_reservation_config = parent_rpcs&.get_bi_reservation if parent_rpcs&.respond_to? :get_bi_reservation
|
1982
|
+
@get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config
|
1983
|
+
update_bi_reservation_config = parent_rpcs&.update_bi_reservation if parent_rpcs&.respond_to? :update_bi_reservation
|
1984
|
+
@update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config
|
1985
|
+
|
1986
|
+
yield self if block_given?
|
1987
|
+
end
|
1988
|
+
end
|
1989
|
+
end
|
1990
|
+
end
|
1991
|
+
end
|
1992
|
+
end
|
1993
|
+
end
|
1994
|
+
end
|
1995
|
+
end
|
1996
|
+
end
|