Autogenerated update (2019-01-09)

Update:
- speech_v1
This commit is contained in:
Google APIs 2019-01-09 00:36:31 +00:00
parent 6216bc19ca
commit a0b09622e3
29 changed files with 29873 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
# 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/containeranalysis_v1alpha1/service.rb'
require 'google/apis/containeranalysis_v1alpha1/classes.rb'
require 'google/apis/containeranalysis_v1alpha1/representations.rb'
module Google
module Apis
# Container Analysis API
#
# An implementation of the Grafeas API, which stores, and enables querying and
# retrieval of critical metadata about all of your software artifacts.
#
# @see https://cloud.google.com/container-analysis/api/reference/rest/
module ContaineranalysisV1alpha1
VERSION = 'V1alpha1'
REVISION = '20181207'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
# 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/containeranalysis_v1beta1/service.rb'
require 'google/apis/containeranalysis_v1beta1/classes.rb'
require 'google/apis/containeranalysis_v1beta1/representations.rb'
module Google
module Apis
# Container Analysis API
#
# An implementation of the Grafeas API, which stores, and enables querying and
# retrieval of critical metadata about all of your software artifacts.
#
# @see https://cloud.google.com/container-analysis/api/reference/rest/
module ContaineranalysisV1beta1
VERSION = 'V1beta1'
REVISION = '20181207'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,932 @@
# 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 ContaineranalysisV1beta1
# Container Analysis API
#
# An implementation of the Grafeas API, which stores, and enables querying and
# retrieval of critical metadata about all of your software artifacts.
#
# @example
# require 'google/apis/containeranalysis_v1beta1'
#
# Containeranalysis = Google::Apis::ContaineranalysisV1beta1 # Alias the module
# service = Containeranalysis::ContainerAnalysisService.new
#
# @see https://cloud.google.com/container-analysis/api/reference/rest/
class ContainerAnalysisService < 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://containeranalysis.googleapis.com/', '')
@batch_path = 'batch'
end
# Creates new notes in batch.
# @param [String] parent
# The name of the project in the form of `projects/[PROJECT_ID]`, under which
# the notes are to be created.
# @param [Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesRequest] batch_create_notes_request_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::ContaineranalysisV1beta1::BatchCreateNotesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesResponse]
#
# @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 batch_create_notes(parent, batch_create_notes_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/notes:batchCreate', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesRequest::Representation
command.request_object = batch_create_notes_request_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesResponse::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::BatchCreateNotesResponse
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
# Creates a new note.
# @param [String] parent
# The name of the project in the form of `projects/[PROJECT_ID]`, under which
# the note is to be created.
# @param [Google::Apis::ContaineranalysisV1beta1::Note] note_object
# @param [String] note_id
# The ID to use for this note.
# @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::ContaineranalysisV1beta1::Note] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Note]
#
# @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_note(parent, note_object = nil, note_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/notes', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
command.request_object = note_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Note
command.params['parent'] = parent unless parent.nil?
command.query['noteId'] = note_id unless note_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 the specified note.
# @param [String] name
# The name of the note in the form of
# `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
# @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::ContaineranalysisV1beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::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_note(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Empty::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::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 specified note.
# @param [String] name
# The name of the note in the form of
# `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
# @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::ContaineranalysisV1beta1::Note] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Note]
#
# @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_note(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Note
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 access control policy for a note or an occurrence resource.
# Requires `containeranalysis.notes.setIamPolicy` or
# `containeranalysis.occurrences.setIamPolicy` permission if the resource is
# a note or occurrence, respectively.
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
# occurrences.
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::ContaineranalysisV1beta1::GetIamPolicyRequest] get_iam_policy_request_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::ContaineranalysisV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Policy]
#
# @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_note_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Policy::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Policy
command.params['resource'] = resource unless resource.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 notes for the specified project.
# @param [String] parent
# The name of the project to list notes for in the form of
# `projects/[PROJECT_ID]`.
# @param [String] filter
# The filter expression.
# @param [Fixnum] page_size
# Number of notes to return in the list. Must be positive. Max allowed page
# size is 1000. If not specified, page size defaults to 20.
# @param [String] page_token
# Token to provide to skip to a particular spot in the list.
# @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::ContaineranalysisV1beta1::ListNotesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::ListNotesResponse]
#
# @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_notes(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/notes', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::ListNotesResponse::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::ListNotesResponse
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 the specified note.
# @param [String] name
# The name of the note in the form of
# `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
# @param [Google::Apis::ContaineranalysisV1beta1::Note] note_object
# @param [String] update_mask
# The fields to update.
# @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::ContaineranalysisV1beta1::Note] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Note]
#
# @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_note(name, note_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
command.request_object = note_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Note
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
# Sets the access control policy on the specified note or occurrence.
# Requires `containeranalysis.notes.setIamPolicy` or
# `containeranalysis.occurrences.setIamPolicy` permission if the resource is
# a note or an occurrence, respectively.
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
# occurrences.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::ContaineranalysisV1beta1::SetIamPolicyRequest] set_iam_policy_request_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::ContaineranalysisV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Policy]
#
# @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 set_note_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Policy::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Policy
command.params['resource'] = resource unless resource.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 the permissions that a caller has on the specified note or
# occurrence. Requires list permission on the project (for example,
# `containeranalysis.notes.list`).
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
# occurrences.
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_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::ContaineranalysisV1beta1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse]
#
# @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 test_note_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse
command.params['resource'] = resource unless resource.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 occurrences referencing the specified note. Provider projects can use
# this method to get all occurrences across consumer projects referencing the
# specified note.
# @param [String] name
# The name of the note to list occurrences for in the form of
# `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
# @param [String] filter
# The filter expression.
# @param [Fixnum] page_size
# Number of occurrences to return in the list.
# @param [String] page_token
# Token to provide to skip to a particular spot in the list.
# @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::ContaineranalysisV1beta1::ListNoteOccurrencesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::ListNoteOccurrencesResponse]
#
# @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_note_occurrences(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}/occurrences', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::ListNoteOccurrencesResponse::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::ListNoteOccurrencesResponse
command.params['name'] = name unless name.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
# Creates new occurrences in batch.
# @param [String] parent
# The name of the project in the form of `projects/[PROJECT_ID]`, under which
# the occurrences are to be created.
# @param [Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesRequest] batch_create_occurrences_request_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::ContaineranalysisV1beta1::BatchCreateOccurrencesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesResponse]
#
# @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 batch_create_occurrences(parent, batch_create_occurrences_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/occurrences:batchCreate', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesRequest::Representation
command.request_object = batch_create_occurrences_request_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesResponse::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::BatchCreateOccurrencesResponse
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
# Creates a new occurrence.
# @param [String] parent
# The name of the project in the form of `projects/[PROJECT_ID]`, under which
# the occurrence is to be created.
# @param [Google::Apis::ContaineranalysisV1beta1::Occurrence] occurrence_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::ContaineranalysisV1beta1::Occurrence] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Occurrence]
#
# @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_occurrence(parent, occurrence_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/occurrences', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
command.request_object = occurrence_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Occurrence
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 the specified occurrence. For example, use this method to delete an
# occurrence when the occurrence is no longer applicable for the given
# resource.
# @param [String] name
# The name of the occurrence in the form of
# `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
# @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::ContaineranalysisV1beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::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_occurrence(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Empty::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::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 specified occurrence.
# @param [String] name
# The name of the occurrence in the form of
# `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
# @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::ContaineranalysisV1beta1::Occurrence] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Occurrence]
#
# @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_occurrence(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Occurrence
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 access control policy for a note or an occurrence resource.
# Requires `containeranalysis.notes.setIamPolicy` or
# `containeranalysis.occurrences.setIamPolicy` permission if the resource is
# a note or occurrence, respectively.
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
# occurrences.
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::ContaineranalysisV1beta1::GetIamPolicyRequest] get_iam_policy_request_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::ContaineranalysisV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Policy]
#
# @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_occurrence_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Policy::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Policy
command.params['resource'] = resource unless resource.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 note attached to the specified occurrence. Consumer projects can
# use this method to get a note that belongs to a provider project.
# @param [String] name
# The name of the occurrence in the form of
# `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
# @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::ContaineranalysisV1beta1::Note] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Note]
#
# @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_occurrence_notes(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}/notes', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Note::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Note
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 a summary of the number and severity of occurrences.
# @param [String] parent
# The name of the project to get a vulnerability summary for in the form of
# `projects/[PROJECT_ID]`.
# @param [String] filter
# The filter expression.
# @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::ContaineranalysisV1beta1::VulnerabilityOccurrencesSummary] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::VulnerabilityOccurrencesSummary]
#
# @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_occurrence_vulnerability_summary(parent, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/occurrences:vulnerabilitySummary', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::VulnerabilityOccurrencesSummary::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::VulnerabilityOccurrencesSummary
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.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 occurrences for the specified project.
# @param [String] parent
# The name of the project to list occurrences for in the form of
# `projects/[PROJECT_ID]`.
# @param [String] filter
# The filter expression.
# @param [Fixnum] page_size
# Number of occurrences to return in the list. Must be positive. Max allowed
# page size is 1000. If not specified, page size defaults to 20.
# @param [String] page_token
# Token to provide to skip to a particular spot in the list.
# @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::ContaineranalysisV1beta1::ListOccurrencesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::ListOccurrencesResponse]
#
# @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_occurrences(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/occurrences', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::ListOccurrencesResponse::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::ListOccurrencesResponse
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 the specified occurrence.
# @param [String] name
# The name of the occurrence in the form of
# `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
# @param [Google::Apis::ContaineranalysisV1beta1::Occurrence] occurrence_object
# @param [String] update_mask
# The fields to update.
# @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::ContaineranalysisV1beta1::Occurrence] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Occurrence]
#
# @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_occurrence(name, occurrence_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
command.request_object = occurrence_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Occurrence::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Occurrence
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
# Sets the access control policy on the specified note or occurrence.
# Requires `containeranalysis.notes.setIamPolicy` or
# `containeranalysis.occurrences.setIamPolicy` permission if the resource is
# a note or an occurrence, respectively.
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
# occurrences.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::ContaineranalysisV1beta1::SetIamPolicyRequest] set_iam_policy_request_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::ContaineranalysisV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::Policy]
#
# @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 set_occurrence_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::Policy::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::Policy
command.params['resource'] = resource unless resource.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 the permissions that a caller has on the specified note or
# occurrence. Requires list permission on the project (for example,
# `containeranalysis.notes.list`).
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
# occurrences.
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_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::ContaineranalysisV1beta1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse]
#
# @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 test_occurrence_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::TestIamPermissionsResponse
command.params['resource'] = resource unless resource.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 specified scan configuration.
# @param [String] name
# The name of the scan configuration in the form of
# `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
# @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::ContaineranalysisV1beta1::ScanConfig] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::ScanConfig]
#
# @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_scan_config(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::ScanConfig::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::ScanConfig
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 scan configurations for the specified project.
# @param [String] parent
# The name of the project to list scan configurations for in the form of
# `projects/[PROJECT_ID]`.
# @param [String] filter
# The filter expression.
# @param [Fixnum] page_size
# The number of scan configs to return in the list.
# @param [String] page_token
# Token to provide to skip to a particular spot in the list.
# @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::ContaineranalysisV1beta1::ListScanConfigsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::ListScanConfigsResponse]
#
# @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_scan_configs(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/scanConfigs', options)
command.response_representation = Google::Apis::ContaineranalysisV1beta1::ListScanConfigsResponse::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::ListScanConfigsResponse
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 the specified scan configuration.
# @param [String] name
# The name of the scan configuration in the form of
# `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
# @param [Google::Apis::ContaineranalysisV1beta1::ScanConfig] scan_config_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::ContaineranalysisV1beta1::ScanConfig] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContaineranalysisV1beta1::ScanConfig]
#
# @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 update_project_scan_config(name, scan_config_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::ContaineranalysisV1beta1::ScanConfig::Representation
command.request_object = scan_config_object
command.response_representation = Google::Apis::ContaineranalysisV1beta1::ScanConfig::Representation
command.response_class = Google::Apis::ContaineranalysisV1beta1::ScanConfig
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
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

@ -0,0 +1,34 @@
# 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/libraryagent_v1/service.rb'
require 'google/apis/libraryagent_v1/classes.rb'
require 'google/apis/libraryagent_v1/representations.rb'
module Google
module Apis
# Library Agent API
#
# A simple Google Example Library API.
#
# @see https://cloud.google.com/docs/quota
module LibraryagentV1
VERSION = 'V1'
REVISION = '20190105'
# 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

@ -0,0 +1,151 @@
# 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 LibraryagentV1
# A single book in the library.
class GoogleExampleLibraryagentV1Book
include Google::Apis::Core::Hashable
# The name of the book author.
# Corresponds to the JSON property `author`
# @return [String]
attr_accessor :author
# The resource name of the book.
# Book names have the form `shelves/`shelf_id`/books/`book_id``.
# The name is ignored when creating a book.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Value indicating whether the book has been read.
# Corresponds to the JSON property `read`
# @return [Boolean]
attr_accessor :read
alias_method :read?, :read
# The title of the book.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@author = args[:author] if args.key?(:author)
@name = args[:name] if args.key?(:name)
@read = args[:read] if args.key?(:read)
@title = args[:title] if args.key?(:title)
end
end
# Response message for LibraryAgent.ListBooks.
class GoogleExampleLibraryagentV1ListBooksResponse
include Google::Apis::Core::Hashable
# The list of books.
# Corresponds to the JSON property `books`
# @return [Array<Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book>]
attr_accessor :books
# A token to retrieve next page of results.
# Pass this value in the
# ListBooksRequest.page_token
# field in the subsequent call to `ListBooks` method to retrieve the next
# page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@books = args[:books] if args.key?(:books)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Response message for LibraryAgent.ListShelves.
class GoogleExampleLibraryagentV1ListShelvesResponse
include Google::Apis::Core::Hashable
# A token to retrieve next page of results.
# Pass this value in the
# ListShelvesRequest.page_token
# field in the subsequent call to `ListShelves` method to retrieve the next
# page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The list of shelves.
# Corresponds to the JSON property `shelves`
# @return [Array<Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Shelf>]
attr_accessor :shelves
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)
@shelves = args[:shelves] if args.key?(:shelves)
end
end
# A Shelf contains a collection of books with a theme.
class GoogleExampleLibraryagentV1Shelf
include Google::Apis::Core::Hashable
# Output only. The resource name of the shelf.
# Shelf names have the form `shelves/`shelf_id``.
# The name is ignored when creating a shelf.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The theme of the shelf
# Corresponds to the JSON property `theme`
# @return [String]
attr_accessor :theme
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@theme = args[:theme] if args.key?(:theme)
end
end
end
end
end

View File

@ -0,0 +1,86 @@
# 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 LibraryagentV1
class GoogleExampleLibraryagentV1Book
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleExampleLibraryagentV1ListBooksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleExampleLibraryagentV1ListShelvesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleExampleLibraryagentV1Shelf
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleExampleLibraryagentV1Book
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :author, as: 'author'
property :name, as: 'name'
property :read, as: 'read'
property :title, as: 'title'
end
end
class GoogleExampleLibraryagentV1ListBooksResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :books, as: 'books', class: Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book, decorator: Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class GoogleExampleLibraryagentV1ListShelvesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :shelves, as: 'shelves', class: Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Shelf, decorator: Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Shelf::Representation
end
end
class GoogleExampleLibraryagentV1Shelf
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :theme, as: 'theme'
end
end
end
end
end

View File

@ -0,0 +1,265 @@
# 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 LibraryagentV1
# Library Agent API
#
# A simple Google Example Library API.
#
# @example
# require 'google/apis/libraryagent_v1'
#
# Libraryagent = Google::Apis::LibraryagentV1 # Alias the module
# service = Libraryagent::LibraryagentService.new
#
# @see https://cloud.google.com/docs/quota
class LibraryagentService < 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://libraryagent.googleapis.com/', '')
@batch_path = 'batch'
end
# Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
# @param [String] name
# The name of the shelf to retrieve.
# @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::LibraryagentV1::GoogleExampleLibraryagentV1Shelf] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Shelf]
#
# @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_shelf(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Shelf::Representation
command.response_class = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Shelf
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 shelves. The order is unspecified but deterministic. Newly created
# shelves will not necessarily be added to the end of this list.
# @param [Fixnum] page_size
# Requested page size. Server may return fewer shelves than requested.
# If unspecified, server will pick an appropriate default.
# @param [String] page_token
# A token identifying a page of results the server should return.
# Typically, this is the value of
# ListShelvesResponse.next_page_token
# returned from the previous call to `ListShelves` method.
# @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::LibraryagentV1::GoogleExampleLibraryagentV1ListShelvesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1ListShelvesResponse]
#
# @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_shelves(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/shelves', options)
command.response_representation = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1ListShelvesResponse::Representation
command.response_class = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1ListShelvesResponse
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
# Borrow a book from the library. Returns the book if it is borrowed
# successfully. Returns NOT_FOUND if the book does not exist in the library.
# Returns quota exceeded error if the amount of books borrowed exceeds
# allocation quota in any dimensions.
# @param [String] name
# The name of the book to borrow.
# @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::LibraryagentV1::GoogleExampleLibraryagentV1Book] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book]
#
# @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 borrow_shelf_book(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:borrow', options)
command.response_representation = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book::Representation
command.response_class = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book
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 a book. Returns NOT_FOUND if the book does not exist.
# @param [String] name
# The name of the book to retrieve.
# @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::LibraryagentV1::GoogleExampleLibraryagentV1Book] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book]
#
# @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_shelf_book(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book::Representation
command.response_class = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book
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 books in a shelf. The order is unspecified but deterministic. Newly
# created books will not necessarily be added to the end of this list.
# Returns NOT_FOUND if the shelf does not exist.
# @param [String] parent
# The name of the shelf whose books we'd like to list.
# @param [Fixnum] page_size
# Requested page size. Server may return fewer books than requested.
# If unspecified, server will pick an appropriate default.
# @param [String] page_token
# A token identifying a page of results the server should return.
# Typically, this is the value of
# ListBooksResponse.next_page_token.
# returned from the previous call to `ListBooks` method.
# @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::LibraryagentV1::GoogleExampleLibraryagentV1ListBooksResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1ListBooksResponse]
#
# @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_shelf_books(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/books', options)
command.response_representation = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1ListBooksResponse::Representation
command.response_class = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1ListBooksResponse
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
# Return a book to the library. Returns the book if it is returned to the
# library successfully.
# Returns error if the book does not belong to the library
# or the users didn't borrow before.
# @param [String] name
# The name of the book to return.
# @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::LibraryagentV1::GoogleExampleLibraryagentV1Book] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book]
#
# @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 return_shelf_book(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:return', options)
command.response_representation = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book::Representation
command.response_class = Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book
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
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

@ -0,0 +1,34 @@
# 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/remotebuildexecution_v1/service.rb'
require 'google/apis/remotebuildexecution_v1/classes.rb'
require 'google/apis/remotebuildexecution_v1/representations.rb'
module Google
module Apis
# Remote Build Execution API
#
# Supplies a Remote Execution API service for tools such as bazel.
#
# @see https://cloud.google.com/remote-build-execution/docs/
module RemotebuildexecutionV1
VERSION = 'V1'
REVISION = '20190103'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,374 @@
# 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 RemotebuildexecutionV1
# Remote Build Execution API
#
# Supplies a Remote Execution API service for tools such as bazel.
#
# @example
# require 'google/apis/remotebuildexecution_v1'
#
# Remotebuildexecution = Google::Apis::RemotebuildexecutionV1 # Alias the module
# service = Remotebuildexecution::RemoteBuildExecutionService.new
#
# @see https://cloud.google.com/remote-build-execution/docs/
class RemoteBuildExecutionService < 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://remotebuildexecution.googleapis.com/', '')
@batch_path = 'batch'
end
# Downloads media. Download is supported
# on the URI `/v1/media/`+name`?alt=media`.
# @param [String] resource_name
# Name of the media that is being downloaded. See
# ReadRequest.resource_name.
# @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 [IO, String] download_dest
# IO stream or filename to receive content download
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia]
#
# @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 download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
if download_dest.nil?
command = make_simple_command(:get, 'v1/media/{+resourceName}', options)
else
command = make_download_command(:get, 'v1/media/{+resourceName}', options)
command.download_dest = download_dest
end
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia
command.params['resourceName'] = resource_name unless resource_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
# Uploads media. Upload is supported on
# the URI `/upload/v1/media/`+name``.
# @param [String] resource_name
# Name of the media that is being downloaded. See
# ReadRequest.resource_name.
# @param [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia] google_bytestream_media_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 [IO, String] upload_source
# IO stream or filename containing content to upload
# @param [String] content_type
# Content type of the uploaded content.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia]
#
# @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 upload_medium(resource_name, google_bytestream_media_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
if upload_source.nil?
command = make_simple_command(:post, 'v1/media/{+resourceName}', options)
else
command = make_upload_command(:post, 'v1/media/{+resourceName}', options)
command.upload_source = upload_source
command.upload_content_type = content_type
end
command.request_representation = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia::Representation
command.request_object = google_bytestream_media_object
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia
command.params['resourceName'] = resource_name unless resource_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
# 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 [Google::Apis::RemotebuildexecutionV1::GoogleLongrunningCancelOperationRequest] google_longrunning_cancel_operation_request_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::RemotebuildexecutionV1::GoogleProtobufEmpty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty]
#
# @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_operation(name, google_longrunning_cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
command.request_representation = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningCancelOperationRequest::Representation
command.request_object = google_longrunning_cancel_operation_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty
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
# Deletes a long-running operation. This method indicates that the client is
# no longer interested in the operation result. It does not cancel the
# operation. If the server doesn't support this method, it returns
# `google.rpc.Code.UNIMPLEMENTED`.
# @param [String] name
# The name of the operation resource to be deleted.
# @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::RemotebuildexecutionV1::GoogleProtobufEmpty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty]
#
# @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_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty
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 operations that match the specified filter in the request. If the
# server doesn't support this method, it returns `UNIMPLEMENTED`.
# NOTE: the `name` binding allows API services to override the binding
# to use different resource name schemes, such as `users/*/operations`. To
# override the binding, API services can add a binding such as
# `"/v1/`name=users/*`/operations"` to their service configuration.
# For backwards compatibility, the default name includes the operations
# collection id, however overriding users must ensure the name binding
# is the parent resource, without the operations collection id.
# @param [String] name
# The name of the operation's parent resource.
# @param [String] filter
# The standard list filter.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] page_token
# The standard list page token.
# @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::RemotebuildexecutionV1::GoogleLongrunningListOperationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1::GoogleLongrunningListOperationsResponse]
#
# @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_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningListOperationsResponse::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningListOperationsResponse
command.params['name'] = name unless name.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
# 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::RemotebuildexecutionV1::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1::GoogleLongrunningOperation]
#
# @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_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningOperation
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
# Start a streaming RPC to get watch information from the server.
# @param [String] resume_marker
# The `resume_marker` specifies how much of the existing underlying state is
# delivered to the client when the watch request is received by the
# system. The client can set this marker in one of the following ways to get
# different semantics:
# * Parameter is not specified or has the value "".
# Semantics: Fetch initial state.
# The client wants the entity's initial state to be delivered. See the
# description in "Initial State".
# * Parameter is set to the string "now" (UTF-8 encoding).
# Semantics: Fetch new changes only.
# The client just wants to get the changes received by the system after
# the watch point. The system may deliver changes from before the watch
# point as well.
# * Parameter is set to a value received in an earlier
# `Change.resume_marker` field while watching the same entity.
# Semantics: Resume from a specific point.
# The client wants to receive the changes from a specific point; this
# value must correspond to a value received in the `Change.resume_marker`
# field. The system may deliver changes from before the `resume_marker`
# as well. If the system cannot resume the stream from this point (e.g.,
# if it is too far behind in the stream), it can raise the
# `FAILED_PRECONDITION` error.
# An implementation MUST support an unspecified parameter and the
# empty string "" marker (initial state fetching) and the "now" marker.
# It need not support resuming from a specific point.
# @param [String] target
# The `target` value **must** be a valid URL path pointing to an entity
# to watch. Note that the service name **must** be
# removed from the target field (e.g., the target field must say
# "/foo/bar", not "myservice.googleapis.com/foo/bar"). A client is
# also allowed to pass system-specific parameters in the URL that
# are only obeyed by some implementations. Some parameters will be
# implementation-specific. However, some have predefined meaning
# and are listed here:
# * recursive = true|false [default=false]
# If set to true, indicates that the client wants to watch all elements
# of entities in the subtree rooted at the entity's name in `target`. For
# descendants that are not the immediate children of the target, the
# `Change.element` will contain slashes.
# Note that some namespaces and entities will not support recursive
# watching. When watching such an entity, a client must not set recursive
# to true. Otherwise, it will receive an `UNIMPLEMENTED` error.
# Normal URL encoding must be used inside `target`. For example, if a query
# parameter name or value, or the non-query parameter portion of `target`
# contains a special character, it must be %-encoded. We recommend that
# clients and servers use their runtime's URL library to produce and consume
# target values.
# @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::RemotebuildexecutionV1::GoogleWatcherV1ChangeBatch] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1::GoogleWatcherV1ChangeBatch]
#
# @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 watch(resume_marker: nil, target: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1:watch', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleWatcherV1ChangeBatch::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleWatcherV1ChangeBatch
command.query['resumeMarker'] = resume_marker unless resume_marker.nil?
command.query['target'] = target unless target.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

@ -0,0 +1,34 @@
# 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/remotebuildexecution_v1alpha/service.rb'
require 'google/apis/remotebuildexecution_v1alpha/classes.rb'
require 'google/apis/remotebuildexecution_v1alpha/representations.rb'
module Google
module Apis
# Remote Build Execution API
#
# Supplies a Remote Execution API service for tools such as bazel.
#
# @see https://cloud.google.com/remote-build-execution/docs/
module RemotebuildexecutionV1alpha
VERSION = 'V1alpha'
REVISION = '20190103'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,400 @@
# 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 RemotebuildexecutionV1alpha
# Remote Build Execution API
#
# Supplies a Remote Execution API service for tools such as bazel.
#
# @example
# require 'google/apis/remotebuildexecution_v1alpha'
#
# Remotebuildexecution = Google::Apis::RemotebuildexecutionV1alpha # Alias the module
# service = Remotebuildexecution::RemoteBuildExecutionService.new
#
# @see https://cloud.google.com/remote-build-execution/docs/
class RemoteBuildExecutionService < 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://admin-remotebuildexecution.googleapis.com/', '')
@batch_path = 'batch'
end
# Creates a new instance in the specified region.
# Returns a long running operation which contains an instance on completion.
# While the long running operation is in progress, any call to `GetInstance`
# returns an instance in state `CREATING`.
# @param [String] parent
# Resource name of the project containing the instance.
# Format: `projects/[PROJECT_ID]`.
# @param [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest] google_devtools_remotebuildexecution_admin_v1alpha_create_instance_request_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::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
#
# @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_instance(parent, google_devtools_remotebuildexecution_admin_v1alpha_create_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha/{+parent}/instances', options)
command.request_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest::Representation
command.request_object = google_devtools_remotebuildexecution_admin_v1alpha_create_instance_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
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 the specified instance.
# Returns a long running operation which contains a `google.protobuf.Empty`
# response on completion.
# Deleting an instance with worker pools in it will delete these worker
# pools.
# @param [String] name
# Name of the instance to delete.
# Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.
# @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::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
#
# @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_instance(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1alpha/{+name}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
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 the specified instance.
# @param [String] name
# Name of the instance to retrieve.
# Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.
# @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::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance]
#
# @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_instance(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha/{+name}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance
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 instances in a project.
# @param [String] parent
# Resource name of the project.
# Format: `projects/[PROJECT_ID]`.
# @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::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse]
#
# @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_instances(parent, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha/{+parent}/instances', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse
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
# Creates a new worker pool with a specified size and configuration.
# Returns a long running operation which contains a worker pool on
# completion. While the long running operation is in progress, any call to
# `GetWorkerPool` returns a worker pool in state `CREATING`.
# @param [String] parent
# Resource name of the instance in which to create the new worker pool.
# Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.
# @param [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest] google_devtools_remotebuildexecution_admin_v1alpha_create_worker_pool_request_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::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
#
# @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_instance_workerpool(parent, google_devtools_remotebuildexecution_admin_v1alpha_create_worker_pool_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha/{+parent}/workerpools', options)
command.request_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest::Representation
command.request_object = google_devtools_remotebuildexecution_admin_v1alpha_create_worker_pool_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
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 the specified worker pool.
# Returns a long running operation, which contains a `google.protobuf.Empty`
# response on completion.
# While the long running operation is in progress, any call to
# `GetWorkerPool` returns a worker pool in state `DELETING`.
# @param [String] name
# Name of the worker pool to delete.
# Format:
# `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.
# @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::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
#
# @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_instance_workerpool(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1alpha/{+name}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
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 the specified worker pool.
# @param [String] name
# Name of the worker pool to retrieve.
# Format:
# `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.
# @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::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool]
#
# @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_instance_workerpool(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha/{+name}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool
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 worker pools in an instance.
# @param [String] parent
# Resource name of the instance.
# Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.
# @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::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse]
#
# @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_instance_workerpools(parent, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha/{+parent}/workerpools', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse
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
# Updates an existing worker pool with a specified size and/or configuration.
# Returns a long running operation, which contains a worker pool on
# completion. While the long running operation is in progress, any call to
# `GetWorkerPool` returns a worker pool in state `UPDATING`.
# @param [String] name
# WorkerPool resource name formatted as:
# `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.
# name should not be populated when creating a worker pool since it is
# provided in the `poolId` field.
# @param [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest] google_devtools_remotebuildexecution_admin_v1alpha_update_worker_pool_request_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::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
#
# @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_instance_workerpool(name, google_devtools_remotebuildexecution_admin_v1alpha_update_worker_pool_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1alpha/{+name}', options)
command.request_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest::Representation
command.request_object = google_devtools_remotebuildexecution_admin_v1alpha_update_worker_pool_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
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::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
#
# @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_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha/{+name}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
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
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

@ -0,0 +1,34 @@
# 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/remotebuildexecution_v2/service.rb'
require 'google/apis/remotebuildexecution_v2/classes.rb'
require 'google/apis/remotebuildexecution_v2/representations.rb'
module Google
module Apis
# Remote Build Execution API
#
# Supplies a Remote Execution API service for tools such as bazel.
#
# @see https://cloud.google.com/remote-build-execution/docs/
module RemotebuildexecutionV2
VERSION = 'V2'
REVISION = '20190103'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,542 @@
# 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 RemotebuildexecutionV2
# Remote Build Execution API
#
# Supplies a Remote Execution API service for tools such as bazel.
#
# @example
# require 'google/apis/remotebuildexecution_v2'
#
# Remotebuildexecution = Google::Apis::RemotebuildexecutionV2 # Alias the module
# service = Remotebuildexecution::RemoteBuildExecutionService.new
#
# @see https://cloud.google.com/remote-build-execution/docs/
class RemoteBuildExecutionService < 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://remotebuildexecution.googleapis.com/', '')
@batch_path = 'batch'
end
# Retrieve a cached execution result.
# Errors:
# * `NOT_FOUND`: The requested `ActionResult` is not in the cache.
# @param [String] instance_name
# The instance of the execution system to operate against. A server may
# support multiple instances of the execution system (with their own workers,
# storage, caches, etc.). The server MAY require use of this field to select
# between them in an implementation-defined fashion, otherwise it can be
# omitted.
# @param [String] hash_
# The hash. In the case of SHA-256, it will always be a lowercase hex string
# exactly 64 characters long.
# @param [Fixnum] size_bytes
# The size of the blob, in bytes.
# @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::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult]
#
# @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_action_result(instance_name, hash_, size_bytes, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+instanceName}/actionResults/{hash}/{sizeBytes}', options)
command.response_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult
command.params['instanceName'] = instance_name unless instance_name.nil?
command.params['hash'] = hash_ unless hash_.nil?
command.params['sizeBytes'] = size_bytes unless size_bytes.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Upload a new execution result.
# This method is intended for servers which implement the distributed cache
# independently of the
# Execution API. As a
# result, it is OPTIONAL for servers to implement.
# In order to allow the server to perform access control based on the type of
# action, and to assist with client debugging, the client MUST first upload
# the Action that produced the
# result, along with its
# Command, into the
# `ContentAddressableStorage`.
# Errors:
# * `UNIMPLEMENTED`: This method is not supported by the server.
# * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
# entry to the cache.
# @param [String] instance_name
# The instance of the execution system to operate against. A server may
# support multiple instances of the execution system (with their own workers,
# storage, caches, etc.). The server MAY require use of this field to select
# between them in an implementation-defined fashion, otherwise it can be
# omitted.
# @param [String] hash_
# The hash. In the case of SHA-256, it will always be a lowercase hex string
# exactly 64 characters long.
# @param [Fixnum] size_bytes
# The size of the blob, in bytes.
# @param [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult] build_bazel_remote_execution_v2_action_result_object
# @param [Fixnum] results_cache_policy_priority
# The priority (relative importance) of this content in the overall cache.
# Generally, a lower value means a longer retention time or other advantage,
# but the interpretation of a given value is server-dependent. A priority of
# 0 means a *default* value, decided by the server.
# The particular semantics of this field is up to the server. In particular,
# every server will have their own supported range of priorities, and will
# decide how these map into retention/eviction policy.
# @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::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult]
#
# @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 update_action_result(instance_name, hash_, size_bytes, build_bazel_remote_execution_v2_action_result_object = nil, results_cache_policy_priority: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v2/{+instanceName}/actionResults/{hash}/{sizeBytes}', options)
command.request_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult::Representation
command.request_object = build_bazel_remote_execution_v2_action_result_object
command.response_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult
command.params['instanceName'] = instance_name unless instance_name.nil?
command.params['hash'] = hash_ unless hash_.nil?
command.params['sizeBytes'] = size_bytes unless size_bytes.nil?
command.query['resultsCachePolicy.priority'] = results_cache_policy_priority unless results_cache_policy_priority.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Execute an action remotely.
# In order to execute an action, the client must first upload all of the
# inputs, the
# Command to run, and the
# Action into the
# ContentAddressableStorage.
# It then calls `Execute` with an `action_digest` referring to them. The
# server will run the action and eventually return the result.
# The input `Action`'s fields MUST meet the various canonicalization
# requirements specified in the documentation for their types so that it has
# the same digest as other logically equivalent `Action`s. The server MAY
# enforce the requirements and return errors if a non-canonical input is
# received. It MAY also proceed without verifying some or all of the
# requirements, such as for performance reasons. If the server does not
# verify the requirement, then it will treat the `Action` as distinct from
# another logically equivalent action if they hash differently.
# Returns a stream of
# google.longrunning.Operation messages
# describing the resulting execution, with eventual `response`
# ExecuteResponse. The
# `metadata` on the operation is of type
# ExecuteOperationMetadata.
# If the client remains connected after the first response is returned after
# the server, then updates are streamed as if the client had called
# WaitExecution
# until the execution completes or the request reaches an error. The
# operation can also be queried using Operations
# API.
# The server NEED NOT implement other methods or functionality of the
# Operations API.
# Errors discovered during creation of the `Operation` will be reported
# as gRPC Status errors, while errors that occurred while running the
# action will be reported in the `status` field of the `ExecuteResponse`. The
# server MUST NOT set the `error` field of the `Operation` proto.
# The possible errors include:
# * `INVALID_ARGUMENT`: One or more arguments are invalid.
# * `FAILED_PRECONDITION`: One or more errors occurred in setting up the
# action requested, such as a missing input or command or no worker being
# available. The client may be able to fix the errors and retry.
# * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run
# the action.
# * `UNAVAILABLE`: Due to a transient condition, such as all workers being
# occupied (and the server does not support a queue), the action could not
# be started. The client should retry.
# * `INTERNAL`: An internal error occurred in the execution engine or the
# worker.
# * `DEADLINE_EXCEEDED`: The execution timed out.
# In the case of a missing input or command, the server SHOULD additionally
# send a PreconditionFailure error detail
# where, for each requested blob not present in the CAS, there is a
# `Violation` with a `type` of `MISSING` and a `subject` of
# `"blobs/`hash`/`size`"` indicating the digest of the missing blob.
# @param [String] instance_name
# The instance of the execution system to operate against. A server may
# support multiple instances of the execution system (with their own workers,
# storage, caches, etc.). The server MAY require use of this field to select
# between them in an implementation-defined fashion, otherwise it can be
# omitted.
# @param [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ExecuteRequest] build_bazel_remote_execution_v2_execute_request_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::RemotebuildexecutionV2::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::GoogleLongrunningOperation]
#
# @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 execute_action(instance_name, build_bazel_remote_execution_v2_execute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/{+instanceName}/actions:execute', options)
command.request_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ExecuteRequest::Representation
command.request_object = build_bazel_remote_execution_v2_execute_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV2::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::GoogleLongrunningOperation
command.params['instanceName'] = instance_name unless instance_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
# Download many blobs at once.
# The server may enforce a limit of the combined total size of blobs
# to be downloaded using this API. This limit may be obtained using the
# Capabilities API.
# Requests exceeding the limit should either be split into smaller
# chunks or downloaded using the
# ByteStream API, as appropriate.
# This request is equivalent to calling a Bytestream `Read` request
# on each individual blob, in parallel. The requests may succeed or fail
# independently.
# Errors:
# * `INVALID_ARGUMENT`: The client attempted to read more than the
# server supported limit.
# Every error on individual read will be returned in the corresponding digest
# status.
# @param [String] instance_name
# The instance of the execution system to operate against. A server may
# support multiple instances of the execution system (with their own workers,
# storage, caches, etc.). The server MAY require use of this field to select
# between them in an implementation-defined fashion, otherwise it can be
# omitted.
# @param [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchReadBlobsRequest] build_bazel_remote_execution_v2_batch_read_blobs_request_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::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchReadBlobsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchReadBlobsResponse]
#
# @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 batch_blob_read(instance_name, build_bazel_remote_execution_v2_batch_read_blobs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/{+instanceName}/blobs:batchRead', options)
command.request_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchReadBlobsRequest::Representation
command.request_object = build_bazel_remote_execution_v2_batch_read_blobs_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchReadBlobsResponse::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchReadBlobsResponse
command.params['instanceName'] = instance_name unless instance_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
# Upload many blobs at once.
# The server may enforce a limit of the combined total size of blobs
# to be uploaded using this API. This limit may be obtained using the
# Capabilities API.
# Requests exceeding the limit should either be split into smaller
# chunks or uploaded using the
# ByteStream API, as appropriate.
# This request is equivalent to calling a Bytestream `Write` request
# on each individual blob, in parallel. The requests may succeed or fail
# independently.
# Errors:
# * `INVALID_ARGUMENT`: The client attempted to upload more than the
# server supported limit.
# Individual requests may return the following errors, additionally:
# * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob.
# * `INVALID_ARGUMENT`: The
# Digest does not match the
# provided data.
# @param [String] instance_name
# The instance of the execution system to operate against. A server may
# support multiple instances of the execution system (with their own workers,
# storage, caches, etc.). The server MAY require use of this field to select
# between them in an implementation-defined fashion, otherwise it can be
# omitted.
# @param [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest] build_bazel_remote_execution_v2_batch_update_blobs_request_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::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse]
#
# @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 batch_blob_update(instance_name, build_bazel_remote_execution_v2_batch_update_blobs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/{+instanceName}/blobs:batchUpdate', options)
command.request_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest::Representation
command.request_object = build_bazel_remote_execution_v2_batch_update_blobs_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse
command.params['instanceName'] = instance_name unless instance_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
# Determine if blobs are present in the CAS.
# Clients can use this API before uploading blobs to determine which ones are
# already present in the CAS and do not need to be uploaded again.
# There are no method-specific errors.
# @param [String] instance_name
# The instance of the execution system to operate against. A server may
# support multiple instances of the execution system (with their own workers,
# storage, caches, etc.). The server MAY require use of this field to select
# between them in an implementation-defined fashion, otherwise it can be
# omitted.
# @param [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2FindMissingBlobsRequest] build_bazel_remote_execution_v2_find_missing_blobs_request_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::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2FindMissingBlobsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2FindMissingBlobsResponse]
#
# @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 find_blob_missing(instance_name, build_bazel_remote_execution_v2_find_missing_blobs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/{+instanceName}/blobs:findMissing', options)
command.request_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2FindMissingBlobsRequest::Representation
command.request_object = build_bazel_remote_execution_v2_find_missing_blobs_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2FindMissingBlobsResponse::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2FindMissingBlobsResponse
command.params['instanceName'] = instance_name unless instance_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
# Fetch the entire directory tree rooted at a node.
# This request must be targeted at a
# Directory stored in the
# ContentAddressableStorage
# (CAS). The server will enumerate the `Directory` tree recursively and
# return every node descended from the root.
# The GetTreeRequest.page_token parameter can be used to skip ahead in
# the stream (e.g. when retrying a partially completed and aborted request),
# by setting it to a value taken from GetTreeResponse.next_page_token of the
# last successfully processed GetTreeResponse).
# The exact traversal order is unspecified and, unless retrieving subsequent
# pages from an earlier request, is not guaranteed to be stable across
# multiple invocations of `GetTree`.
# If part of the tree is missing from the CAS, the server will return the
# portion present and omit the rest.
# * `NOT_FOUND`: The requested tree root is not present in the CAS.
# @param [String] instance_name
# The instance of the execution system to operate against. A server may
# support multiple instances of the execution system (with their own workers,
# storage, caches, etc.). The server MAY require use of this field to select
# between them in an implementation-defined fashion, otherwise it can be
# omitted.
# @param [String] hash_
# The hash. In the case of SHA-256, it will always be a lowercase hex string
# exactly 64 characters long.
# @param [Fixnum] size_bytes
# The size of the blob, in bytes.
# @param [Fixnum] page_size
# A maximum page size to request. If present, the server will request no more
# than this many items. Regardless of whether a page size is specified, the
# server may place its own limit on the number of items to be returned and
# require the client to retrieve more items using a subsequent request.
# @param [String] page_token
# A page token, which must be a value received in a previous
# GetTreeResponse.
# If present, the server will use it to return the following page of results.
# @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::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2GetTreeResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2GetTreeResponse]
#
# @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_blob_tree(instance_name, hash_, size_bytes, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+instanceName}/blobs/{hash}/{sizeBytes}:getTree', options)
command.response_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2GetTreeResponse::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2GetTreeResponse
command.params['instanceName'] = instance_name unless instance_name.nil?
command.params['hash'] = hash_ unless hash_.nil?
command.params['sizeBytes'] = size_bytes unless size_bytes.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
# Wait for an execution operation to complete. When the client initially
# makes the request, the server immediately responds with the current status
# of the execution. The server will leave the request stream open until the
# operation completes, and then respond with the completed operation. The
# server MAY choose to stream additional updates as execution progresses,
# such as to provide an update as to the state of the execution.
# @param [String] name
# The name of the Operation
# returned by Execute.
# @param [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2WaitExecutionRequest] build_bazel_remote_execution_v2_wait_execution_request_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::RemotebuildexecutionV2::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::GoogleLongrunningOperation]
#
# @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 wait_operation_execution(name, build_bazel_remote_execution_v2_wait_execution_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/{+name}:waitExecution', options)
command.request_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2WaitExecutionRequest::Representation
command.request_object = build_bazel_remote_execution_v2_wait_execution_request_object
command.response_representation = Google::Apis::RemotebuildexecutionV2::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::GoogleLongrunningOperation
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
# GetCapabilities returns the server capabilities configuration.
# @param [String] instance_name
# The instance of the execution system to operate against. A server may
# support multiple instances of the execution system (with their own workers,
# storage, caches, etc.). The server MAY require use of this field to select
# between them in an implementation-defined fashion, otherwise it can be
# omitted.
# @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::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ServerCapabilities] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ServerCapabilities]
#
# @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_capabilities(instance_name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/{+instanceName}/capabilities', options)
command.response_representation = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ServerCapabilities::Representation
command.response_class = Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ServerCapabilities
command.params['instanceName'] = instance_name unless instance_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
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

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/speech-to-text/docs/quickstart-protocol # @see https://cloud.google.com/speech-to-text/docs/quickstart-protocol
module SpeechV1 module SpeechV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20181127' REVISION = '20190104'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -286,6 +286,17 @@ module Google
attr_accessor :enable_automatic_punctuation attr_accessor :enable_automatic_punctuation
alias_method :enable_automatic_punctuation?, :enable_automatic_punctuation alias_method :enable_automatic_punctuation?, :enable_automatic_punctuation
# This needs to be set to true explicitly and `audio_channel_count` > 1
# to get each channel recognized separately. The recognition result will
# contain a `channel_tag` field to state which channel that result belongs
# to. If this is not true, we will only recognize the first channel. The
# request is billed cumulatively for all channels recognized:
# `audio_channel_count` multiplied by the length of the audio.
# Corresponds to the JSON property `enableSeparateRecognitionPerChannel`
# @return [Boolean]
attr_accessor :enable_separate_recognition_per_channel
alias_method :enable_separate_recognition_per_channel?, :enable_separate_recognition_per_channel
# *Optional* If `true`, the top result includes a list of words and # *Optional* If `true`, the top result includes a list of words and
# the start and end time offsets (timestamps) for those words. If # the start and end time offsets (timestamps) for those words. If
# `false`, no word-level time offset information is returned. The default is # `false`, no word-level time offset information is returned. The default is
@ -409,6 +420,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@enable_automatic_punctuation = args[:enable_automatic_punctuation] if args.key?(:enable_automatic_punctuation) @enable_automatic_punctuation = args[:enable_automatic_punctuation] if args.key?(:enable_automatic_punctuation)
@enable_separate_recognition_per_channel = args[:enable_separate_recognition_per_channel] if args.key?(:enable_separate_recognition_per_channel)
@enable_word_time_offsets = args[:enable_word_time_offsets] if args.key?(:enable_word_time_offsets) @enable_word_time_offsets = args[:enable_word_time_offsets] if args.key?(:enable_word_time_offsets)
@encoding = args[:encoding] if args.key?(:encoding) @encoding = args[:encoding] if args.key?(:encoding)
@language_code = args[:language_code] if args.key?(:language_code) @language_code = args[:language_code] if args.key?(:language_code)
@ -548,6 +560,13 @@ module Google
# @return [Array<Google::Apis::SpeechV1::SpeechRecognitionAlternative>] # @return [Array<Google::Apis::SpeechV1::SpeechRecognitionAlternative>]
attr_accessor :alternatives attr_accessor :alternatives
# For multi-channel audio, this is the channel number corresponding to the
# recognized result for the audio from that channel.
# For audio_channel_count = N, its output values can range from '1' to 'N'.
# Corresponds to the JSON property `channelTag`
# @return [Fixnum]
attr_accessor :channel_tag
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -555,6 +574,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@alternatives = args[:alternatives] if args.key?(:alternatives) @alternatives = args[:alternatives] if args.key?(:alternatives)
@channel_tag = args[:channel_tag] if args.key?(:channel_tag)
end end
end end

View File

@ -166,6 +166,7 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :enable_automatic_punctuation, as: 'enableAutomaticPunctuation' property :enable_automatic_punctuation, as: 'enableAutomaticPunctuation'
property :enable_separate_recognition_per_channel, as: 'enableSeparateRecognitionPerChannel'
property :enable_word_time_offsets, as: 'enableWordTimeOffsets' property :enable_word_time_offsets, as: 'enableWordTimeOffsets'
property :encoding, as: 'encoding' property :encoding, as: 'encoding'
property :language_code, as: 'languageCode' property :language_code, as: 'languageCode'
@ -219,6 +220,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1::SpeechRecognitionAlternative::Representation collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1::SpeechRecognitionAlternative::Representation
property :channel_tag, as: 'channelTag'
end end
end end

View File

@ -126,6 +126,117 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end 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::SpeechV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SpeechV1::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, 'v1/{+name}', options)
command.response_representation = Google::Apis::SpeechV1::Operation::Representation
command.response_class = Google::Apis::SpeechV1::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
# Lists operations that match the specified filter in the request. If the
# server doesn't support this method, it returns `UNIMPLEMENTED`.
# NOTE: the `name` binding allows API services to override the binding
# to use different resource name schemes, such as `users/*/operations`. To
# override the binding, API services can add a binding such as
# `"/v1/`name=users/*`/operations"` to their service configuration.
# For backwards compatibility, the default name includes the operations
# collection id, however overriding users must ensure the name binding
# is the parent resource, without the operations collection id.
# @param [String] name
# The name of the operation's parent resource.
# @param [String] filter
# The standard list filter.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] page_token
# The standard list page token.
# @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::SpeechV1::ListOperationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SpeechV1::ListOperationsResponse]
#
# @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_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}/operations', options)
command.response_representation = Google::Apis::SpeechV1::ListOperationsResponse::Representation
command.response_class = Google::Apis::SpeechV1::ListOperationsResponse
command.params['name'] = name unless name.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
# 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::SpeechV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SpeechV1::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_operation_manual_recognition_task(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::SpeechV1::Operation::Representation
command.response_class = Google::Apis::SpeechV1::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
# Performs asynchronous speech recognition: receive results via the # Performs asynchronous speech recognition: receive results via the
# google.longrunning.Operations interface. Returns either an # google.longrunning.Operations interface. Returns either an
# `Operation.error` or an `Operation.response` which contains # `Operation.error` or an `Operation.response` which contains