feat: Automated removal of obsolete clients (#1742)

This PR was generated using Autosynth. 🌈


<details><summary>Log from Synthtool</summary>

```
2020-12-11 03:41:03,164 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-clean
nothing to commit, working tree clean
2020-12-11 03:41:03,213 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth clean
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth clean
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.51.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.1
Installing parallel 1.20.1
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

If you are upgrading your Rails application from an older version of Rails:

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

If you are starting a NEW Rails application, you can ignore this notice.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

Post-install message from httparty:
When you HTTParty, you must party hard!
bundle exec bin/generate-api gen generated --clean
2020-12-11 03:41:24,242 synthtool [DEBUG] > Wrote metadata to synth.metadata.
DEBUG:synthtool:Wrote metadata to synth.metadata.

```
</details>

Full log will be available here:
https://source.cloud.google.com/results/invocations/461ec1a9-2841-43d5-b073-8c3cf2cfc89e/targets

- [ ] To automatically regenerate this PR, check this box.
This commit is contained in:
Yoshi Automation Bot 2020-12-11 03:54:03 -08:00 committed by GitHub
parent 4f12b755fb
commit 14926bc602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 1292 deletions

View File

@ -1,37 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/bigqueryreservation_v1alpha2/service.rb'
require 'google/apis/bigqueryreservation_v1alpha2/classes.rb'
require 'google/apis/bigqueryreservation_v1alpha2/representations.rb'
module Google
module Apis
# BigQuery Reservation API
#
# A service to modify your BigQuery flat-rate reservations.
#
# @see https://cloud.google.com/bigquery/
module BigqueryreservationV1alpha2
VERSION = 'V1alpha2'
REVISION = '20200801'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -1,426 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module BigqueryreservationV1alpha2
# The metadata for operation returned from ReservationService.CreateSlotPool.
class CreateSlotPoolMetadata
include Google::Apis::Core::Hashable
# Resource name of the slot pool that is being created. E.g., projects/myproject/
# locations/us-central1/reservations/foo/slotPools/123
# Corresponds to the JSON property `slotPool`
# @return [String]
attr_accessor :slot_pool
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@slot_pool = args[:slot_pool] if args.key?(:slot_pool)
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance: service Foo ` rpc Bar(google.
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
# `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The response for ReservationService.ListReservationGrants.
class ListReservationGrantsResponse
include Google::Apis::Core::Hashable
# Token to retrieve the next page of results, or empty if there are no more
# results in the list.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# List of reservation grants visible to the user.
# Corresponds to the JSON property `reservationGrants`
# @return [Array<Google::Apis::BigqueryreservationV1alpha2::ReservationGrant>]
attr_accessor :reservation_grants
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@reservation_grants = args[:reservation_grants] if args.key?(:reservation_grants)
end
end
# The response for ReservationService.ListReservations.
class ListReservationsResponse
include Google::Apis::Core::Hashable
# Token to retrieve the next page of results, or empty if there are no more
# results in the list.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# List of reservations visible to the user.
# Corresponds to the JSON property `reservations`
# @return [Array<Google::Apis::BigqueryreservationV1alpha2::Reservation>]
attr_accessor :reservations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@reservations = args[:reservations] if args.key?(:reservations)
end
end
# The response for ReservationService.ListSlotPools.
class ListSlotPoolsResponse
include Google::Apis::Core::Hashable
# Token to retrieve the next page of results, or empty if there are no more
# results in the list.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# List of slot pools visible to the user.
# Corresponds to the JSON property `slotPools`
# @return [Array<Google::Apis::BigqueryreservationV1alpha2::SlotPool>]
attr_accessor :slot_pools
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@slot_pools = args[:slot_pools] if args.key?(:slot_pools)
end
end
# This resource represents a long-running operation that is the result of a
# network API call.
class Operation
include Google::Apis::Core::Hashable
# If the value is `false`, it means the operation is still in progress. If `true`
# , the operation is completed, and either `error` or `response` is available.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
# Corresponds to the JSON property `error`
# @return [Google::Apis::BigqueryreservationV1alpha2::Status]
attr_accessor :error
# Service-specific metadata associated with the operation. It typically contains
# progress information and common metadata such as create time. Some services
# might not provide such metadata. Any method that returns a long-running
# operation should document the metadata type, if any.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# The server-assigned name, which is only unique within the same service that
# originally returns it. If you use the default HTTP mapping, the `name` should
# be a resource name ending with `operations/`unique_id``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The normal response of the operation in case of success. If the original
# method returns no data on success, such as `Delete`, the response is `google.
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
# the response should be the resource. For other methods, the response should
# have the type `XxxResponse`, where `Xxx` is the original method name. For
# example, if the original method name is `TakeSnapshot()`, the inferred
# response type is `TakeSnapshotResponse`.
# Corresponds to the JSON property `response`
# @return [Hash<String,Object>]
attr_accessor :response
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@done = args[:done] if args.key?(:done)
@error = args[:error] if args.key?(:error)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
@response = args[:response] if args.key?(:response)
end
end
# A reservation is a mechanism used to guarantee slots to users.
class Reservation
include Google::Apis::Core::Hashable
# The resource name of the reservation, e.g., "projects/*/locations/*/
# reservations/dev/team/product". Reservation names (e.g., "dev/team/product")
# exceeding a depth of six will fail with `google.rpc.Code.INVALID_ARGUMENT`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Maximum slots available to this reservation and its children. A slot is a unit
# of computational power in BigQuery, and serves as the unit of parallelism. In
# a scan of a multi-partitioned table, a single slot operates on a single
# partition of the table. If the new reservation's slot capacity exceed the
# parent's slot capacity or if total slot capacity of the new reservation and
# its siblings exceeds the parent's slot capacity, the request will fail with `
# google.rpc.Code.RESOURCE_EXHAUSTED`.
# Corresponds to the JSON property `slotCapacity`
# @return [Fixnum]
attr_accessor :slot_capacity
# If true, any query using this reservation will also be submitted to the parent
# reservation. This allows the query to share the additional slot capacity of
# the parent with other queries in the parent reservation. If the parent also
# has this field set to true, then this process will continue until it
# encounters a reservation for which this is false. If false, a query using this
# reservation will execute with the maximum slot capacity as specified above. If
# not specified, default value is true. Ignored for top-level reservation.
# Corresponds to the JSON property `useParentReservation`
# @return [Boolean]
attr_accessor :use_parent_reservation
alias_method :use_parent_reservation?, :use_parent_reservation
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@slot_capacity = args[:slot_capacity] if args.key?(:slot_capacity)
@use_parent_reservation = args[:use_parent_reservation] if args.key?(:use_parent_reservation)
end
end
# A ReservationGrant allows a project to submit jobs of a certain type using
# slots from the specified reservation.
class ReservationGrant
include Google::Apis::Core::Hashable
# The resource which will use the reservation. E.g. projects/myproject, folders/
# 123, organizations/456.
# Corresponds to the JSON property `grantee`
# @return [String]
attr_accessor :grantee
# Which type of jobs will use the reservation.
# Corresponds to the JSON property `jobType`
# @return [String]
attr_accessor :job_type
# Output only. Name of the resource. E.g.: projects/myproject/locations/eu/
# reservationGrants/123.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Resource name of the reservation. E.g., projects/myproject/locations/eu/
# reservations/my_reservation. This reservation must be in the same location as
# the grant. This reservation should belong to the same parent project.
# Corresponds to the JSON property `reservation`
# @return [String]
attr_accessor :reservation
# Output only. State of the ReservationGrant.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@grantee = args[:grantee] if args.key?(:grantee)
@job_type = args[:job_type] if args.key?(:job_type)
@name = args[:name] if args.key?(:name)
@reservation = args[:reservation] if args.key?(:reservation)
@state = args[:state] if args.key?(:state)
end
end
# The response for ReservationService.SearchReservationGrants.
class SearchReservationGrantsResponse
include Google::Apis::Core::Hashable
# Token to retrieve the next page of results, or empty if there are no more
# results in the list.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# List of reservation grants visible to the user.
# Corresponds to the JSON property `reservationGrants`
# @return [Array<Google::Apis::BigqueryreservationV1alpha2::ReservationGrant>]
attr_accessor :reservation_grants
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@reservation_grants = args[:reservation_grants] if args.key?(:reservation_grants)
end
end
# Slot pool is a way to purchase slots with some minimum committed period of
# usage. Slot pool is immutable and cannot be deleted until the end of the
# commitment period. After the end of the commitment period, slots are still
# available but can be freely removed any time. Annual commitments will
# automatically be downgraded to monthly after the commitment ends. A slot pool
# resource exists as a child resource of a top-level reservation. Sum of all the
# ACTIVE pools slot_count is always equal to the reservation slot_capacity.
class SlotPool
include Google::Apis::Core::Hashable
# Output only. The end of the commitment period. Slot pool cannot be removed
# before commitment_end_time. It is applicable only for ACTIVE slot pools and is
# computed as a combination of the plan and the time when the slot pool became
# ACTIVE.
# Corresponds to the JSON property `commitmentEndTime`
# @return [String]
attr_accessor :commitment_end_time
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
# Corresponds to the JSON property `failureStatus`
# @return [Google::Apis::BigqueryreservationV1alpha2::Status]
attr_accessor :failure_status
# Output only. The resource name of the slot pool, e.g., projects/myproject/
# locations/us-central1/reservations/myreservation/slotPools/123
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Slot pool commitment plan.
# Corresponds to the JSON property `plan`
# @return [String]
attr_accessor :plan
# Number of slots in this pool.
# Corresponds to the JSON property `slotCount`
# @return [Fixnum]
attr_accessor :slot_count
# Output only.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@commitment_end_time = args[:commitment_end_time] if args.key?(:commitment_end_time)
@failure_status = args[:failure_status] if args.key?(:failure_status)
@name = args[:name] if args.key?(:name)
@plan = args[:plan] if args.key?(:plan)
@slot_count = args[:slot_count] if args.key?(:slot_count)
@state = args[:state] if args.key?(:state)
end
end
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
class Status
include Google::Apis::Core::Hashable
# The status code, which should be an enum value of google.rpc.Code.
# Corresponds to the JSON property `code`
# @return [Fixnum]
attr_accessor :code
# A list of messages that carry the error details. There is a common set of
# message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
# A developer-facing error message, which should be in English. Any user-facing
# error message should be localized and sent in the google.rpc.Status.details
# field, or localized by the client.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] if args.key?(:code)
@details = args[:details] if args.key?(:details)
@message = args[:message] if args.key?(:message)
end
end
end
end
end

View File

@ -1,195 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module BigqueryreservationV1alpha2
class CreateSlotPoolMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListReservationGrantsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListReservationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListSlotPoolsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Reservation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReservationGrant
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SearchReservationGrantsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SlotPool
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Status
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CreateSlotPoolMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :slot_pool, as: 'slotPool'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class ListReservationGrantsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :reservation_grants, as: 'reservationGrants', class: Google::Apis::BigqueryreservationV1alpha2::ReservationGrant, decorator: Google::Apis::BigqueryreservationV1alpha2::ReservationGrant::Representation
end
end
class ListReservationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :reservations, as: 'reservations', class: Google::Apis::BigqueryreservationV1alpha2::Reservation, decorator: Google::Apis::BigqueryreservationV1alpha2::Reservation::Representation
end
end
class ListSlotPoolsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :slot_pools, as: 'slotPools', class: Google::Apis::BigqueryreservationV1alpha2::SlotPool, decorator: Google::Apis::BigqueryreservationV1alpha2::SlotPool::Representation
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::BigqueryreservationV1alpha2::Status, decorator: Google::Apis::BigqueryreservationV1alpha2::Status::Representation
hash :metadata, as: 'metadata'
property :name, as: 'name'
hash :response, as: 'response'
end
end
class Reservation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :slot_capacity, :numeric_string => true, as: 'slotCapacity'
property :use_parent_reservation, as: 'useParentReservation'
end
end
class ReservationGrant
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :grantee, as: 'grantee'
property :job_type, as: 'jobType'
property :name, as: 'name'
property :reservation, as: 'reservation'
property :state, as: 'state'
end
end
class SearchReservationGrantsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :reservation_grants, as: 'reservationGrants', class: Google::Apis::BigqueryreservationV1alpha2::ReservationGrant, decorator: Google::Apis::BigqueryreservationV1alpha2::ReservationGrant::Representation
end
end
class SlotPool
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :commitment_end_time, as: 'commitmentEndTime'
property :failure_status, as: 'failureStatus', class: Google::Apis::BigqueryreservationV1alpha2::Status, decorator: Google::Apis::BigqueryreservationV1alpha2::Status::Representation
property :name, as: 'name'
property :plan, as: 'plan'
property :slot_count, :numeric_string => true, as: 'slotCount'
property :state, as: 'state'
end
end
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :details, as: 'details'
property :message, as: 'message'
end
end
end
end
end

View File

@ -1,622 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module BigqueryreservationV1alpha2
# BigQuery Reservation API
#
# A service to modify your BigQuery flat-rate reservations.
#
# @example
# require 'google/apis/bigqueryreservation_v1alpha2'
#
# Bigqueryreservation = Google::Apis::BigqueryreservationV1alpha2 # Alias the module
# service = Bigqueryreservation::BigQueryReservationService.new
#
# @see https://cloud.google.com/bigquery/
class BigQueryReservationService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user
def initialize
super('https://bigqueryreservation.googleapis.com/', '')
@batch_path = 'batch'
end
# Look up grants for a specified resource for a particular region. If the
# request is about a project: 1) Grants created on the project will be returned
# if they exist. 2) Otherwise grants created on the closest ancestor will be
# returned. 3) Grants for different JobTypes will all be returned. Same logic
# applies if the request is about a folder. If the request is about an
# organization, then grants created on the organization will be returned (
# organization doesn't have ancestors). Comparing to ListReservationGrants,
# there are two behavior differences: 1) permission on the grantee will be
# verified in this API. 2) Hierarchy lookup (project->folder->organization)
# happens in this API.
# @param [String] parent
# The parent resource name (containing project and location), which owns the
# grants. e.g.: "projects/myproject/locations/us-central1".
# @param [Fixnum] page_size
# The maximum number of items to return.
# @param [String] page_token
# The next_page_token value returned from a previous List request, if any.
# @param [String] query
# Please specify resource name as grantee in the query. e.g., "grantee=projects/
# myproject" "grantee=folders/123" "grantee=organizations/456"
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::SearchReservationGrantsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::SearchReservationGrantsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def search_project_location_reservation_grants(parent, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha2/{+parent}:SearchReservationGrants', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::SearchReservationGrantsResponse::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::SearchReservationGrantsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['query'] = query unless query.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Starts asynchronous cancellation on a long-running operation. The server makes
# a best effort to cancel the operation, but success is not guaranteed. If the
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
# Clients can use Operations.GetOperation or other methods to check whether the
# cancellation succeeded or whether the operation completed despite cancellation.
# On successful cancellation, the operation is not deleted; instead, it becomes
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
# corresponding to `Code.CANCELLED`.
# @param [String] name
# The name of the operation resource to be cancelled.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha2/{+name}:cancel', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Empty::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the latest state of a long-running operation. Clients can use this method
# to poll the operation result at intervals as recommended by the API service.
# @param [String] name
# The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha2/{+name}', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Operation::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have 'bigquery.
# admin' permissions on the project using the reservation and the project that
# owns this reservation. Returns `google.rpc.Code.INVALID_ARGUMENT` when
# location of the grant does not match location of the reservation.
# @param [String] parent
# The parent resource name of the reservation grant E.g.: projects/myproject/
# location/eu.
# @param [Google::Apis::BigqueryreservationV1alpha2::ReservationGrant] reservation_grant_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::ReservationGrant] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::ReservationGrant]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_reservation_grant(parent, reservation_grant_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha2/{+parent}/reservationGrants', options)
command.request_representation = Google::Apis::BigqueryreservationV1alpha2::ReservationGrant::Representation
command.request_object = reservation_grant_object
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::ReservationGrant::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::ReservationGrant
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a reservation grant. No expansion will happen. E.g: organizationA
# contains project1 and project2. Reservation res1 exists.
# CreateReservationGrant was invoked previously and following grants were
# created explicitly: Then deletion of won't affect . After deletion of ,
# queries from project1 will still use res1, while queries from project2 will
# use on-demand mode.
# @param [String] name
# Name of the resource, e.g.: projects/myproject/locations/eu/reservationGrants/
# 123
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_location_reservation_grant(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1alpha2/{+name}', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Empty::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists reservation grants. Only explicitly created grants will be returned. E.g:
# organizationA contains project1 and project2. Reservation res1 exists.
# CreateReservationGrant was invoked previously and following grants were
# created explicitly: Then this API will just return the above two grants for
# reservation res1, and no expansion/merge will happen.
# @param [String] parent
# The parent resource name e.g.: projects/myproject/location/eu.
# @param [Fixnum] page_size
# The maximum number of items to return.
# @param [String] page_token
# The next_page_token value returned from a previous List request, if any.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::ListReservationGrantsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::ListReservationGrantsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_location_reservation_grants(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha2/{+parent}/reservationGrants', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::ListReservationGrantsResponse::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::ListReservationGrantsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a new reservation resource. Multiple reservations are created if the
# ancestor reservations do not exist.
# @param [String] parent
# Project, location, and (optionally) reservation name. E.g., projects/myproject/
# locations/us-central1/reservations/parent
# @param [Google::Apis::BigqueryreservationV1alpha2::Reservation] reservation_object
# @param [String] reservation_id
# The reservation ID relative to the parent, e.g., "dev". This field must only
# contain alphanumeric characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Reservation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Reservation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_reservation(parent, reservation_object = nil, reservation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha2/{+parent}/reservations', options)
command.request_representation = Google::Apis::BigqueryreservationV1alpha2::Reservation::Representation
command.request_object = reservation_object
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Reservation::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Reservation
command.params['parent'] = parent unless parent.nil?
command.query['reservationId'] = reservation_id unless reservation_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a new reservation resource. Multiple reservations are created if the
# ancestor reservations do not exist.
# @param [String] parent
# Project, location, and (optionally) reservation name. E.g., projects/myproject/
# locations/us-central1/reservations/parent
# @param [Google::Apis::BigqueryreservationV1alpha2::Reservation] reservation_object
# @param [String] reservation_id
# The reservation ID relative to the parent, e.g., "dev". This field must only
# contain alphanumeric characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Reservation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Reservation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_reservation_reservation(parent, reservation_object = nil, reservation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha2/{+parent}', options)
command.request_representation = Google::Apis::BigqueryreservationV1alpha2::Reservation::Representation
command.request_object = reservation_object
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Reservation::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Reservation
command.params['parent'] = parent unless parent.nil?
command.query['reservationId'] = reservation_id unless reservation_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` in the
# following cases: 1. When reservation has child reservations. This check can be
# bypassed by setting DeleteReservationRequest.force flag to true. 2. When top-
# level reservation with slot pools is being deleted.
# @param [String] name
# Resource name of the reservation to retrieve. E.g., projects/myproject/
# locations/us-central1/reservations/my_reservation
# @param [Boolean] force
# If true, deletes all the child reservations of the given reservation.
# Otherwise, attempting to delete a reservation that has child reservations will
# fail with error code `google.rpc.Code.FAILED_PRECONDITION`.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_location_reservation(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1alpha2/{+name}', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Empty::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Empty
command.params['name'] = name unless name.nil?
command.query['force'] = force unless force.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns information about the reservation.
# @param [String] name
# Resource name of the reservation to retrieve. E.g., projects/myproject/
# locations/us-central1/reservations/path/to/reserv
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Reservation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Reservation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_reservation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha2/{+name}', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Reservation::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Reservation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists all the reservations for the project in the specified location.
# @param [String] parent
# The parent resource name containing project and location, e.g.: "projects/
# myproject/locations/us-central1"
# @param [String] filter
# Can be used to filter out reservations based on names, capacity, etc, e.g.:
# filter="reservation.slot_capacity > 200" filter="reservation.name = \"*dev/*\""
# Advanced filtering syntax can be [here](https://cloud.google.com/logging/docs/
# view/advanced-filters).
# @param [Fixnum] page_size
# The maximum number of items to return.
# @param [String] page_token
# The next_page_token value returned from a previous List request, if any.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::ListReservationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::ListReservationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_location_reservations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha2/{+parent}/reservations', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::ListReservationsResponse::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::ListReservationsResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates an existing reservation resource. Applicable only for child
# reservations.
# @param [String] name
# The resource name of the reservation, e.g., "projects/*/locations/*/
# reservations/dev/team/product". Reservation names (e.g., "dev/team/product")
# exceeding a depth of six will fail with `google.rpc.Code.INVALID_ARGUMENT`.
# @param [Google::Apis::BigqueryreservationV1alpha2::Reservation] reservation_object
# @param [String] update_mask
# Standard field mask for the set of fields to be updated.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Reservation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Reservation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_project_location_reservation(name, reservation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1alpha2/{+name}', options)
command.request_representation = Google::Apis::BigqueryreservationV1alpha2::Reservation::Representation
command.request_object = reservation_object
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Reservation::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Reservation
command.params['name'] = name unless name.nil?
command.query['updateMask'] = update_mask unless update_mask.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a slot pool. Attempting to delete slot pool before its
# commitment_end_time will fail with the error code `google.rpc.Code.
# FAILED_PRECONDITION`.
# @param [String] name
# Resource name of the slot pool to delete. E.g., projects/myproject/locations/
# us-central1/reservations/my_reservation/slotPools/123
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_location_reservation_slot_pool(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1alpha2/{+name}', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Empty::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns information about the slot pool.
# @param [String] name
# Resource name of the slot pool to retrieve. E.g., projects/myproject/locations/
# us-central1/reservations/my_reservation/slotPools/123
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::SlotPool] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::SlotPool]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_reservation_slot_pool(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha2/{+name}', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::SlotPool::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::SlotPool
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists all the slot pools for the reservation.
# @param [String] parent
# Resource name of the parent reservation. Only top-level reservations can have
# slot pools. E.g., projects/myproject/locations/us-central1/reservations/
# my_reservation
# @param [Fixnum] page_size
# The maximum number of items to return.
# @param [String] page_token
# The next_page_token value returned from a previous List request, if any.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::BigqueryreservationV1alpha2::ListSlotPoolsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigqueryreservationV1alpha2::ListSlotPoolsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_location_reservation_slot_pools(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha2/{+parent}/slotPools', options)
command.response_representation = Google::Apis::BigqueryreservationV1alpha2::ListSlotPoolsResponse::Representation
command.response_class = Google::Apis::BigqueryreservationV1alpha2::ListSlotPoolsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end

View File

@ -1,11 +0,0 @@
{
"sources": [
{
"git": {
"name": ".",
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
"sha": "c98c719bbab68d0890524d53f8b629d7858af9c2"
}
}
]
}

View File

@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
"sha": "5b324d8b8a02841fe1e4801f7c6c7181903e2865"
"sha": "ab59cac90424e8499cf546ce0d7dd8ca6a87db44"
}
}
]