google-cloud-bigquery-reservation-v1 0.4.1 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cbf765f55b385d57d78df6ee03d94926125269badf4316365a3f24f4e3e9e81
4
- data.tar.gz: 1e478f1588ce6838ea125b06a22c84359b2c6802d912fbcc94b7de6a7d5e2e7c
3
+ metadata.gz: deb045652e66e9f6507632bec7b77046c95f32c855d3dbb50d823bc2674443a4
4
+ data.tar.gz: 6dee11cab19a9a5cc930554d540333ac5609850d4248e5326f9e3dbf1f08cf1d
5
5
  SHA512:
6
- metadata.gz: fdc7b8174922325541b8405e7418dff7aae3fb4fdecd5ebf837f6a1828d9338fb3766eed22718fe9675e691fb9fb423edc0dcaf47a8ed0dff77f92067ad8c6bc
7
- data.tar.gz: fa6c5c6612d23f4329503614b89124745c3c02cb8ffb54eddffd96ccc3ecd1c76a59e0d72ceb799cb26d60d87c164894af8ae030ac39f7600ae2267b14d39b0d
6
+ metadata.gz: 739570aca307714d51967c9c30f43828cae68b7030b03e3091c94fb8f356d3b9c050a90132f6b423f5278aeb4a51024914057c97d4efcaf9cbea60e5fe6c5f83
7
+ data.tar.gz: 59833edab229bfa222d2d48a503f0b25771b0bd8638b3dd6b51b5f92c9673c40fbc6a1c0398cd71e5ea4787816d25877542b7f4e7eb9037c1269782201d1334a
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=BigQuery Reservation V1 API
2
+ --title="BigQuery Reservation V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.n
37
37
  response = client.create_reservation request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-bigquery-reservation-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/reservations)
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/bigquery/reservation/v1/reservation.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -9,7 +11,6 @@ require 'google/protobuf/empty_pb'
9
11
  require 'google/protobuf/field_mask_pb'
10
12
  require 'google/protobuf/timestamp_pb'
11
13
  require 'google/rpc/status_pb'
12
- require 'google/protobuf'
13
14
 
14
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
16
  add_file("google/cloud/bigquery/reservation/v1/reservation.proto", :syntax => :proto3) do
@@ -17,8 +18,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
18
  optional :name, :string, 1
18
19
  optional :slot_capacity, :int64, 2
19
20
  optional :ignore_idle_slots, :bool, 4
21
+ optional :concurrency, :int64, 16
20
22
  optional :creation_time, :message, 8, "google.protobuf.Timestamp"
21
23
  optional :update_time, :message, 9, "google.protobuf.Timestamp"
24
+ optional :multi_region_auxiliary, :bool, 14
22
25
  end
23
26
  add_message "google.cloud.bigquery.reservation.v1.CapacityCommitment" do
24
27
  optional :name, :string, 1
@@ -29,6 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
32
  optional :commitment_end_time, :message, 5, "google.protobuf.Timestamp"
30
33
  optional :failure_status, :message, 7, "google.rpc.Status"
31
34
  optional :renewal_plan, :enum, 8, "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan"
35
+ optional :multi_region_auxiliary, :bool, 10
32
36
  end
33
37
  add_enum "google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan" do
34
38
  value :COMMITMENT_PLAN_UNSPECIFIED, 0
@@ -163,10 +167,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
163
167
  optional :name, :string, 1
164
168
  optional :destination_id, :string, 3
165
169
  end
170
+ add_message "google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest" do
171
+ optional :assignment, :message, 1, "google.cloud.bigquery.reservation.v1.Assignment"
172
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
173
+ end
174
+ add_message "google.cloud.bigquery.reservation.v1.TableReference" do
175
+ optional :project_id, :string, 1
176
+ optional :dataset_id, :string, 2
177
+ optional :table_id, :string, 3
178
+ end
166
179
  add_message "google.cloud.bigquery.reservation.v1.BiReservation" do
167
180
  optional :name, :string, 1
168
181
  optional :update_time, :message, 3, "google.protobuf.Timestamp"
169
182
  optional :size, :int64, 4
183
+ repeated :preferred_tables, :message, 5, "google.cloud.bigquery.reservation.v1.TableReference"
170
184
  end
171
185
  add_message "google.cloud.bigquery.reservation.v1.GetBiReservationRequest" do
172
186
  optional :name, :string, 1
@@ -214,6 +228,8 @@ module Google
214
228
  SearchAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse").msgclass
215
229
  SearchAllAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse").msgclass
216
230
  MoveAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MoveAssignmentRequest").msgclass
231
+ UpdateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest").msgclass
232
+ TableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.TableReference").msgclass
217
233
  BiReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.BiReservation").msgclass
218
234
  GetBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetBiReservationRequest").msgclass
219
235
  UpdateBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest").msgclass
@@ -81,17 +81,17 @@ module Google
81
81
 
82
82
  default_config.rpcs.create_reservation.timeout = 300.0
83
83
 
84
- default_config.rpcs.list_reservations.timeout = 60.0
84
+ default_config.rpcs.list_reservations.timeout = 300.0
85
85
  default_config.rpcs.list_reservations.retry_policy = {
86
86
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
87
87
  }
88
88
 
89
- default_config.rpcs.get_reservation.timeout = 60.0
89
+ default_config.rpcs.get_reservation.timeout = 300.0
90
90
  default_config.rpcs.get_reservation.retry_policy = {
91
91
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
92
92
  }
93
93
 
94
- default_config.rpcs.delete_reservation.timeout = 60.0
94
+ default_config.rpcs.delete_reservation.timeout = 300.0
95
95
  default_config.rpcs.delete_reservation.retry_policy = {
96
96
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
97
97
  }
@@ -100,17 +100,17 @@ module Google
100
100
 
101
101
  default_config.rpcs.create_capacity_commitment.timeout = 300.0
102
102
 
103
- default_config.rpcs.list_capacity_commitments.timeout = 60.0
103
+ default_config.rpcs.list_capacity_commitments.timeout = 300.0
104
104
  default_config.rpcs.list_capacity_commitments.retry_policy = {
105
105
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
106
106
  }
107
107
 
108
- default_config.rpcs.get_capacity_commitment.timeout = 60.0
108
+ default_config.rpcs.get_capacity_commitment.timeout = 300.0
109
109
  default_config.rpcs.get_capacity_commitment.retry_policy = {
110
110
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
111
111
  }
112
112
 
113
- default_config.rpcs.delete_capacity_commitment.timeout = 60.0
113
+ default_config.rpcs.delete_capacity_commitment.timeout = 300.0
114
114
  default_config.rpcs.delete_capacity_commitment.retry_policy = {
115
115
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
116
116
  }
@@ -123,24 +123,24 @@ module Google
123
123
 
124
124
  default_config.rpcs.create_assignment.timeout = 300.0
125
125
 
126
- default_config.rpcs.list_assignments.timeout = 60.0
126
+ default_config.rpcs.list_assignments.timeout = 300.0
127
127
  default_config.rpcs.list_assignments.retry_policy = {
128
128
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
129
129
  }
130
130
 
131
- default_config.rpcs.delete_assignment.timeout = 60.0
131
+ default_config.rpcs.delete_assignment.timeout = 300.0
132
132
  default_config.rpcs.delete_assignment.retry_policy = {
133
133
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
134
134
  }
135
135
 
136
- default_config.rpcs.search_assignments.timeout = 60.0
136
+ default_config.rpcs.search_assignments.timeout = 300.0
137
137
  default_config.rpcs.search_assignments.retry_policy = {
138
138
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
139
139
  }
140
140
 
141
141
  default_config.rpcs.move_assignment.timeout = 300.0
142
142
 
143
- default_config.rpcs.get_bi_reservation.timeout = 60.0
143
+ default_config.rpcs.get_bi_reservation.timeout = 300.0
144
144
  default_config.rpcs.get_bi_reservation.retry_policy = {
145
145
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
146
146
  }
@@ -249,8 +249,9 @@ module Google
249
249
  # Required. Project, location. E.g.,
250
250
  # `projects/myproject/locations/US`
251
251
  # @param reservation_id [::String]
252
- # The reservation ID. This field must only contain lower case alphanumeric
253
- # characters or dash. Max length is 64 characters.
252
+ # The reservation ID. It must only contain lower case alphanumeric
253
+ # characters or dashes. It must start with a letter and must not end
254
+ # with a dash. Its maximum length is 64 characters.
254
255
  # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash]
255
256
  # Definition of the new reservation to create.
256
257
  #
@@ -705,8 +706,8 @@ module Google
705
706
  # @param capacity_commitment_id [::String]
706
707
  # The optional capacity commitment ID. Capacity commitment name will be
707
708
  # generated automatically if this field is empty.
708
- # This field must only contain lower case alphanumeric characters or dash.
709
- # Max length is 64 characters.
709
+ # This field must only contain lower case alphanumeric characters or dashes.
710
+ # The first and last character cannot be a dash. Max length is 64 characters.
710
711
  # NOTE: this ID won't be kept if the capacity commitment is split or merged.
711
712
  #
712
713
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1149,7 +1150,7 @@ module Google
1149
1150
  #
1150
1151
  # For example, in order to downgrade from 10000 slots to 8000, you might
1151
1152
  # split a 10000 capacity commitment into commitments of 2000 and 8000. Then,
1152
- # you would change the plan of the first one to `FLEX` and then delete it.
1153
+ # you delete the first one after the commitment end time passes.
1153
1154
  #
1154
1155
  # @overload split_capacity_commitment(request, options = nil)
1155
1156
  # Pass arguments to `split_capacity_commitment` via a request object, either of type
@@ -1394,7 +1395,7 @@ module Google
1394
1395
  # @param assignment_id [::String]
1395
1396
  # The optional assignment ID. Assignment name will be generated automatically
1396
1397
  # if this field is empty.
1397
- # This field must only contain lower case alphanumeric characters or dash.
1398
+ # This field must only contain lower case alphanumeric characters or dashes.
1398
1399
  # Max length is 64 characters.
1399
1400
  #
1400
1401
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1684,8 +1685,8 @@ module Google
1684
1685
  end
1685
1686
 
1686
1687
  ##
1687
- # Deprecated: Looks up assignments for a specified resource for a particular region.
1688
- # If the request is about a project:
1688
+ # Deprecated: Looks up assignments for a specified resource for a particular
1689
+ # region. If the request is about a project:
1689
1690
  #
1690
1691
  # 1. Assignments created on the project will be returned if they exist.
1691
1692
  # 2. Otherwise assignments created on the closest ancestor will be
@@ -2032,6 +2033,95 @@ module Google
2032
2033
  raise ::Google::Cloud::Error.from_error(e)
2033
2034
  end
2034
2035
 
2036
+ ##
2037
+ # Updates an existing assignment.
2038
+ #
2039
+ # Only the `priority` field can be updated.
2040
+ #
2041
+ # @overload update_assignment(request, options = nil)
2042
+ # Pass arguments to `update_assignment` via a request object, either of type
2043
+ # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash.
2044
+ #
2045
+ # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash]
2046
+ # A request object representing the call parameters. Required. To specify no
2047
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2048
+ # @param options [::Gapic::CallOptions, ::Hash]
2049
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2050
+ #
2051
+ # @overload update_assignment(assignment: nil, update_mask: nil)
2052
+ # Pass arguments to `update_assignment` via keyword arguments. Note that at
2053
+ # least one keyword argument is required. To specify no parameters, or to keep all
2054
+ # the default parameter values, pass an empty Hash as a request object (see above).
2055
+ #
2056
+ # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash]
2057
+ # Content of the assignment to update.
2058
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2059
+ # Standard field mask for the set of fields to be updated.
2060
+ #
2061
+ # @yield [response, operation] Access the result along with the RPC operation
2062
+ # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
2063
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2064
+ #
2065
+ # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
2066
+ #
2067
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2068
+ #
2069
+ # @example Basic example
2070
+ # require "google/cloud/bigquery/reservation/v1"
2071
+ #
2072
+ # # Create a client object. The client can be reused for multiple calls.
2073
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
2074
+ #
2075
+ # # Create a request. To set request fields, pass in keyword arguments.
2076
+ # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new
2077
+ #
2078
+ # # Call the update_assignment method.
2079
+ # result = client.update_assignment request
2080
+ #
2081
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment.
2082
+ # p result
2083
+ #
2084
+ def update_assignment request, options = nil
2085
+ raise ::ArgumentError, "request must be provided" if request.nil?
2086
+
2087
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest
2088
+
2089
+ # Converts hash and nil to an options object
2090
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2091
+
2092
+ # Customize the options with defaults
2093
+ metadata = @config.rpcs.update_assignment.metadata.to_h
2094
+
2095
+ # Set x-goog-api-client and x-goog-user-project headers
2096
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2097
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2098
+ gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
2099
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2100
+
2101
+ header_params = {}
2102
+ if request.assignment&.name
2103
+ header_params["assignment.name"] = request.assignment.name
2104
+ end
2105
+
2106
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2107
+ metadata[:"x-goog-request-params"] ||= request_params_header
2108
+
2109
+ options.apply_defaults timeout: @config.rpcs.update_assignment.timeout,
2110
+ metadata: metadata,
2111
+ retry_policy: @config.rpcs.update_assignment.retry_policy
2112
+
2113
+ options.apply_defaults timeout: @config.timeout,
2114
+ metadata: @config.metadata,
2115
+ retry_policy: @config.retry_policy
2116
+
2117
+ @reservation_service_stub.call_rpc :update_assignment, request, options: options do |response, operation|
2118
+ yield response, operation if block_given?
2119
+ return response
2120
+ end
2121
+ rescue ::GRPC::BadStatus => e
2122
+ raise ::Google::Cloud::Error.from_error(e)
2123
+ end
2124
+
2035
2125
  ##
2036
2126
  # Retrieves a BI reservation.
2037
2127
  #
@@ -2438,6 +2528,11 @@ module Google
2438
2528
  #
2439
2529
  attr_reader :move_assignment
2440
2530
  ##
2531
+ # RPC-specific configuration for `update_assignment`
2532
+ # @return [::Gapic::Config::Method]
2533
+ #
2534
+ attr_reader :update_assignment
2535
+ ##
2441
2536
  # RPC-specific configuration for `get_bi_reservation`
2442
2537
  # @return [::Gapic::Config::Method]
2443
2538
  #
@@ -2486,6 +2581,8 @@ module Google
2486
2581
  @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config
2487
2582
  move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment
2488
2583
  @move_assignment = ::Gapic::Config::Method.new move_assignment_config
2584
+ update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment
2585
+ @update_assignment = ::Gapic::Config::Method.new update_assignment_config
2489
2586
  get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation
2490
2587
  @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config
2491
2588
  update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation
@@ -85,7 +85,7 @@ module Google
85
85
  #
86
86
  # For example, in order to downgrade from 10000 slots to 8000, you might
87
87
  # split a 10000 capacity commitment into commitments of 2000 and 8000. Then,
88
- # you would change the plan of the first one to `FLEX` and then delete it.
88
+ # you delete the first one after the commitment end time passes.
89
89
  rpc :SplitCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse
90
90
  # Merges capacity commitments of the same plan into a single commitment.
91
91
  #
@@ -169,8 +169,8 @@ module Google
169
169
  # queries from `project1` will still use `res1` while queries from
170
170
  # `project2` will switch to use on-demand mode.
171
171
  rpc :DeleteAssignment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Google::Protobuf::Empty
172
- # Deprecated: Looks up assignments for a specified resource for a particular region.
173
- # If the request is about a project:
172
+ # Deprecated: Looks up assignments for a specified resource for a particular
173
+ # region. If the request is about a project:
174
174
  #
175
175
  # 1. Assignments created on the project will be returned if they exist.
176
176
  # 2. Otherwise assignments created on the closest ancestor will be
@@ -220,6 +220,10 @@ module Google
220
220
  # by providing a transactional change that ensures an assignee always has an
221
221
  # associated reservation.
222
222
  rpc :MoveAssignment, ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment
223
+ # Updates an existing assignment.
224
+ #
225
+ # Only the `priority` field can be updated.
226
+ rpc :UpdateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment
223
227
  # Retrieves a BI reservation.
224
228
  rpc :GetBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation
225
229
  # Updates a BI reservation.
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigquery
23
23
  module Reservation
24
24
  module V1
25
- VERSION = "0.4.1"
25
+ VERSION = "0.6.0"
26
26
  end
27
27
  end
28
28
  end
@@ -26,6 +26,8 @@ module Google
26
26
  ##
27
27
  # To load this package, including all its services, and instantiate a client:
28
28
  #
29
+ # @example
30
+ #
29
31
  # require "google/cloud/bigquery/reservation/v1"
30
32
  # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
31
33
  #
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -27,6 +27,9 @@ module Google
27
27
  # @return [::String]
28
28
  # The resource name of the reservation, e.g.,
29
29
  # `projects/*/locations/*/reservations/team1-prod`.
30
+ # The reservation_id must only contain lower case alphanumeric characters or
31
+ # dashes. It must start with a letter and must not end with a dash. Its
32
+ # maximum length is 64 characters.
30
33
  # @!attribute [rw] slot_capacity
31
34
  # @return [::Integer]
32
35
  # Minimum slots available to this reservation. A slot is a unit of
@@ -35,22 +38,41 @@ module Google
35
38
  # Queries using this reservation might use more slots during runtime if
36
39
  # ignore_idle_slots is set to false.
37
40
  #
38
- # If the new reservation's slot capacity exceed the parent's slot capacity or
39
- # if total slot capacity of the new reservation and its siblings exceeds the
40
- # parent's slot capacity, the request will fail with
41
+ # If the new reservation's slot capacity exceeds the project's slot capacity
42
+ # or if total slot capacity of the new reservation and its siblings exceeds
43
+ # the project's slot capacity, the request will fail with
41
44
  # `google.rpc.Code.RESOURCE_EXHAUSTED`.
45
+ #
46
+ # NOTE: for reservations in US or EU multi-regions, slot capacity constraints
47
+ # are checked separately for default and auxiliary regions. See
48
+ # multi_region_auxiliary flag for more details.
42
49
  # @!attribute [rw] ignore_idle_slots
43
50
  # @return [::Boolean]
44
51
  # If false, any query or pipeline job using this reservation will use idle
45
52
  # slots from other reservations within the same admin project. If true, a
46
53
  # query or pipeline job using this reservation will execute with the slot
47
54
  # capacity specified in the slot_capacity field at most.
55
+ # @!attribute [rw] concurrency
56
+ # @return [::Integer]
57
+ # Maximum number of queries that are allowed to run concurrently in this
58
+ # reservation. This is a soft limit due to asynchronous nature of the system
59
+ # and various optimizations for small queries.
60
+ # Default value is 0 which means that concurrency will be automatically set
61
+ # based on the reservation size.
48
62
  # @!attribute [r] creation_time
49
63
  # @return [::Google::Protobuf::Timestamp]
50
64
  # Output only. Creation time of the reservation.
51
65
  # @!attribute [r] update_time
52
66
  # @return [::Google::Protobuf::Timestamp]
53
67
  # Output only. Last update time of the reservation.
68
+ # @!attribute [rw] multi_region_auxiliary
69
+ # @return [::Boolean]
70
+ # Applicable only for reservations located within one of the BigQuery
71
+ # multi-regions (US or EU).
72
+ #
73
+ # If set to true, this reservation is placed in the organization's
74
+ # secondary region which is designated for disaster recovery purposes.
75
+ # If false, this reservation is placed in the organization's default region.
54
76
  class Reservation
55
77
  include ::Google::Protobuf::MessageExts
56
78
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -70,6 +92,9 @@ module Google
70
92
  # @return [::String]
71
93
  # Output only. The resource name of the capacity commitment, e.g.,
72
94
  # `projects/myproject/locations/US/capacityCommitments/123`
95
+ # The commitment_id must only contain lower case alphanumeric characters or
96
+ # dashes. It must start with a letter and must not end
97
+ # with a dash. Its maximum length is 64 characters.
73
98
  # @!attribute [rw] slot_count
74
99
  # @return [::Integer]
75
100
  # Number of slots in this commitment.
@@ -95,6 +120,14 @@ module Google
95
120
  # The plan this capacity commitment is converted to after commitment_end_time
96
121
  # passes. Once the plan is changed, committed period is extended according to
97
122
  # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
123
+ # @!attribute [rw] multi_region_auxiliary
124
+ # @return [::Boolean]
125
+ # Applicable only for commitments located within one of the BigQuery
126
+ # multi-regions (US or EU).
127
+ #
128
+ # If set to true, this commitment is placed in the organization's
129
+ # secondary region which is designated for disaster recovery purposes.
130
+ # If false, this commitment is placed in the organization's default region.
98
131
  class CapacityCommitment
99
132
  include ::Google::Protobuf::MessageExts
100
133
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -135,11 +168,11 @@ module Google
135
168
  STATE_UNSPECIFIED = 0
136
169
 
137
170
  # Capacity commitment is pending provisioning. Pending capacity commitment
138
- # does not contribute to the parent's slot_capacity.
171
+ # does not contribute to the project's slot_capacity.
139
172
  PENDING = 1
140
173
 
141
174
  # Once slots are provisioned, capacity commitment becomes active.
142
- # slot_count is added to the parent's slot_capacity.
175
+ # slot_count is added to the project's slot_capacity.
143
176
  ACTIVE = 2
144
177
 
145
178
  # Capacity commitment is failed to be activated by the backend.
@@ -154,8 +187,9 @@ module Google
154
187
  # `projects/myproject/locations/US`
155
188
  # @!attribute [rw] reservation_id
156
189
  # @return [::String]
157
- # The reservation ID. This field must only contain lower case alphanumeric
158
- # characters or dash. Max length is 64 characters.
190
+ # The reservation ID. It must only contain lower case alphanumeric
191
+ # characters or dashes. It must start with a letter and must not end
192
+ # with a dash. Its maximum length is 64 characters.
159
193
  # @!attribute [rw] reservation
160
194
  # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation]
161
195
  # Definition of the new reservation to create.
@@ -241,8 +275,8 @@ module Google
241
275
  # @return [::String]
242
276
  # The optional capacity commitment ID. Capacity commitment name will be
243
277
  # generated automatically if this field is empty.
244
- # This field must only contain lower case alphanumeric characters or dash.
245
- # Max length is 64 characters.
278
+ # This field must only contain lower case alphanumeric characters or dashes.
279
+ # The first and last character cannot be a dash. Max length is 64 characters.
246
280
  # NOTE: this ID won't be kept if the capacity commitment is split or merged.
247
281
  class CreateCapacityCommitmentRequest
248
282
  include ::Google::Protobuf::MessageExts
@@ -357,12 +391,14 @@ module Google
357
391
  extend ::Google::Protobuf::MessageExts::ClassMethods
358
392
  end
359
393
 
360
- # A Assignment allows a project to submit jobs
394
+ # An assignment allows a project to submit jobs
361
395
  # of a certain type using slots from the specified reservation.
362
396
  # @!attribute [r] name
363
397
  # @return [::String]
364
398
  # Output only. Name of the resource. E.g.:
365
399
  # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
400
+ # The assignment_id must only contain lower case alphanumeric characters or
401
+ # dashes and the max length is 64 characters.
366
402
  # @!attribute [rw] assignee
367
403
  # @return [::String]
368
404
  # The resource which will use the reservation. E.g.
@@ -424,7 +460,7 @@ module Google
424
460
  # @return [::String]
425
461
  # The optional assignment ID. Assignment name will be generated automatically
426
462
  # if this field is empty.
427
- # This field must only contain lower case alphanumeric characters or dash.
463
+ # This field must only contain lower case alphanumeric characters or dashes.
428
464
  # Max length is 64 characters.
429
465
  class CreateAssignmentRequest
430
466
  include ::Google::Protobuf::MessageExts
@@ -584,6 +620,34 @@ module Google
584
620
  extend ::Google::Protobuf::MessageExts::ClassMethods
585
621
  end
586
622
 
623
+ # The request for {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment ReservationService.UpdateAssignment}.
624
+ # @!attribute [rw] assignment
625
+ # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment]
626
+ # Content of the assignment to update.
627
+ # @!attribute [rw] update_mask
628
+ # @return [::Google::Protobuf::FieldMask]
629
+ # Standard field mask for the set of fields to be updated.
630
+ class UpdateAssignmentRequest
631
+ include ::Google::Protobuf::MessageExts
632
+ extend ::Google::Protobuf::MessageExts::ClassMethods
633
+ end
634
+
635
+ # Fully qualified reference to BigQuery table.
636
+ # Internally stored as google.cloud.bi.v1.BqTableReference.
637
+ # @!attribute [rw] project_id
638
+ # @return [::String]
639
+ # The assigned project ID of the project.
640
+ # @!attribute [rw] dataset_id
641
+ # @return [::String]
642
+ # The ID of the dataset in the above project.
643
+ # @!attribute [rw] table_id
644
+ # @return [::String]
645
+ # The ID of the table in the above dataset.
646
+ class TableReference
647
+ include ::Google::Protobuf::MessageExts
648
+ extend ::Google::Protobuf::MessageExts::ClassMethods
649
+ end
650
+
587
651
  # Represents a BI Reservation.
588
652
  # @!attribute [rw] name
589
653
  # @return [::String]
@@ -596,6 +660,9 @@ module Google
596
660
  # @!attribute [rw] size
597
661
  # @return [::Integer]
598
662
  # Size of a reservation, in bytes.
663
+ # @!attribute [rw] preferred_tables
664
+ # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::TableReference>]
665
+ # Preferred tables to use BI capacity for.
599
666
  class BiReservation
600
667
  include ::Google::Protobuf::MessageExts
601
668
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -44,7 +44,7 @@ module Google
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
46
  #
47
- # Example 3: Pack and unpack a message in Python.
47
+ # Example 3: Pack and unpack a message in Python.
48
48
  #
49
49
  # foo = Foo(...)
50
50
  # any = Any()
@@ -54,7 +54,7 @@ module Google
54
54
  # any.Unpack(foo)
55
55
  # ...
56
56
  #
57
- # Example 4: Pack and unpack a message in Go
57
+ # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
60
  # any, err := anypb.New(foo)
@@ -75,7 +75,7 @@ module Google
75
75
  #
76
76
  #
77
77
  # JSON
78
- # ====
78
+ #
79
79
  # The JSON representation of an `Any` value uses the regular
80
80
  # representation of the deserialized, embedded message, with an
81
81
  # additional field `@type` which contains the type URL. Example:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery-reservation-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2022-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.10'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: '0.10'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -200,14 +200,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
200
  requirements:
201
201
  - - ">="
202
202
  - !ruby/object:Gem::Version
203
- version: '2.5'
203
+ version: '2.6'
204
204
  required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  requirements: []
210
- rubygems_version: 3.2.17
210
+ rubygems_version: 3.3.14
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: API Client library for the BigQuery Reservation V1 API