Autogenerated update (2017-09-14)

Add:
- cloudtasks_v2beta2

Delete:
- testing_v1

Update:
- androiddeviceprovisioning_v1
- androidpublisher_v2
- bigquerydatatransfer_v1
- compute_alpha
- compute_beta
- compute_v1
- dlp_v2beta1
- youtube_v3
This commit is contained in:
Google APIs 2017-09-14 00:36:39 +00:00
parent 5ad1e06529
commit 5930fb13db
34 changed files with 15693 additions and 3188 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,13 +20,13 @@ module Google
module Apis
# Android Device Provisioning Partner API
#
# Automates reseller integration into Zero Touch Provisioning by assigning
# devices to customers and creating device reports.
# Automates reseller integration into zero-touch enrollment by assigning devices
# to customers and creating device reports.
#
# @see https://developers.google.com/zero-touch/
module AndroiddeviceprovisioningV1
VERSION = 'V1'
REVISION = '20170903'
REVISION = '20170909'
end
end
end

View File

@ -22,8 +22,8 @@ module Google
module AndroiddeviceprovisioningV1
# Android Device Provisioning Partner API
#
# Automates reseller integration into Zero Touch Provisioning by assigning
# devices to customers and creating device reports.
# Automates reseller integration into zero-touch enrollment by assigning devices
# to customers and creating device reports.
#
# @example
# require 'google/apis/androiddeviceprovisioning_v1'
@ -80,7 +80,7 @@ module Google
execute_or_queue_command(command, &block)
end
# A customer for Zero Touch Provisioning will be created.
# A customer for zero-touch enrollment will be created.
# After a Customer is created, their admins and owners will be able to manage
# devices on partner.android.com/zerotouch or via their API.
# @param [String] parent

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/android-publisher
module AndroidpublisherV2
VERSION = 'V2'
REVISION = '20170815'
REVISION = '20170913'
# View and manage your Google Play Developer account
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'

View File

@ -1544,6 +1544,7 @@ module Google
# - User cancelled the subscription
# - Subscription was cancelled by the system, for example because of a billing
# problem
# - Subscription was replaced with a new subscription
# Corresponds to the JSON property `cancelReason`
# @return [Fixnum]
attr_accessor :cancel_reason

View File

@ -18,7 +18,7 @@ require 'google/apis/bigquerydatatransfer_v1/representations.rb'
module Google
module Apis
# BigQuery Data Transfer Service API
# BigQuery Data Transfer API
#
# Transfers data from partner SaaS applications to Google BigQuery on a
# scheduled, managed basis.
@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/bigquery/
module BigquerydatatransferV1
VERSION = 'V1'
REVISION = '20170904'
REVISION = '20170912'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'

View File

@ -337,39 +337,6 @@ module Google
end
end
# A request to determine whether data transfer is enabled for the project.
class IsEnabledRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# A response to indicate whether data transfer is enabled for the project.
class IsEnabledResponse
include Google::Apis::Core::Hashable
# Indicates whether the project is enabled.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
end
end
# Returns list of supported data sources and their metadata.
class ListDataSourcesResponse
include Google::Apis::Core::Hashable
@ -383,7 +350,7 @@ module Google
# this token can be used as the
# `ListDataSourcesRequest.page_token`
# to request the next page of list results.
# @OutputOnly
# Output only.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
@ -559,14 +526,14 @@ module Google
include Google::Apis::Core::Hashable
# End time of the range of transfer runs.
# Corresponds to the JSON property `rangeEndTime`
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :range_end_time
attr_accessor :end_time
# Start time of the range of transfer runs.
# Corresponds to the JSON property `rangeStartTime`
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :range_start_time
attr_accessor :start_time
def initialize(**args)
update!(**args)
@ -574,8 +541,8 @@ module Google
# Update properties of this object
def update!(**args)
@range_end_time = args[:range_end_time] if args.key?(:range_end_time)
@range_start_time = args[:range_start_time] if args.key?(:range_start_time)
@end_time = args[:end_time] if args.key?(:end_time)
@start_time = args[:start_time] if args.key?(:start_time)
end
end
@ -583,10 +550,10 @@ module Google
class ScheduleTransferRunsResponse
include Google::Apis::Core::Hashable
# The transfer runs that were created.
# Corresponds to the JSON property `createdRuns`
# The transfer runs that were scheduled.
# Corresponds to the JSON property `runs`
# @return [Array<Google::Apis::BigquerydatatransferV1::TransferRun>]
attr_accessor :created_runs
attr_accessor :runs
def initialize(**args)
update!(**args)
@ -594,27 +561,7 @@ module Google
# Update properties of this object
def update!(**args)
@created_runs = args[:created_runs] if args.key?(:created_runs)
end
end
# A request to set whether data transfer is enabled or disabled for a project.
class SetEnabledRequest
include Google::Apis::Core::Hashable
# Whether data transfer should be enabled or disabled for the project.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
@runs = args[:runs] if args.key?(:runs)
end
end
@ -666,11 +613,12 @@ module Google
# @return [String]
attr_accessor :display_name
# The resource name of the transfer run.
# Transfer run names have the form
# The resource name of the transfer config.
# Transfer config names have the form
# `projects/`project_id`/transferConfigs/`config_id``.
# Where `config_id` is usually a uuid, even though it is not
# guaranteed or required. The name is ignored when creating a transfer run.
# guaranteed or required. The name is ignored when creating a transfer
# config.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
@ -715,7 +663,7 @@ module Google
# @return [String]
attr_accessor :update_time
# GaiaID of the user on whose behalf transfer is done. Applicable only
# Unique ID of the user on whose behalf transfer is done. Applicable only
# to data sources that do not support service accounts. When set to 0,
# the data source service account credentials are used.
# Output only.
@ -859,7 +807,9 @@ module Google
# @return [String]
attr_accessor :update_time
# The user id for this transfer run.
# Unique ID of the user on whose behalf transfer is done. Applicable only
# to data sources that do not support service accounts. When set to 0,
# the data source service account credentials are used.
# Output only.
# Corresponds to the JSON property `userId`
# @return [Fixnum]

View File

@ -52,18 +52,6 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class IsEnabledRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class IsEnabledResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListDataSourcesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -112,12 +100,6 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SetEnabledRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TransferConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -202,19 +184,6 @@ module Google
end
end
class IsEnabledRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class IsEnabledResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :enabled, as: 'enabled'
end
end
class ListDataSourcesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -273,26 +242,19 @@ module Google
class ScheduleTransferRunsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :range_end_time, as: 'rangeEndTime'
property :range_start_time, as: 'rangeStartTime'
property :end_time, as: 'endTime'
property :start_time, as: 'startTime'
end
end
class ScheduleTransferRunsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :created_runs, as: 'createdRuns', class: Google::Apis::BigquerydatatransferV1::TransferRun, decorator: Google::Apis::BigquerydatatransferV1::TransferRun::Representation
collection :runs, as: 'runs', class: Google::Apis::BigquerydatatransferV1::TransferRun, decorator: Google::Apis::BigquerydatatransferV1::TransferRun::Representation
end
end
class SetEnabledRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :enabled, as: 'enabled'
end
end
class TransferConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -20,7 +20,7 @@ require 'google/apis/errors'
module Google
module Apis
module BigquerydatatransferV1
# BigQuery Data Transfer Service API
# BigQuery Data Transfer API
#
# Transfers data from partner SaaS applications to Google BigQuery on a
# scheduled, managed basis.
@ -48,79 +48,12 @@ module Google
@batch_path = 'batch'
end
# Returns true if data transfer is enabled for a project.
# @param [String] name
# The name of the project resource in the form:
# `projects/`project_id``
# @param [Google::Apis::BigquerydatatransferV1::IsEnabledRequest] is_enabled_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::BigquerydatatransferV1::IsEnabledResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigquerydatatransferV1::IsEnabledResponse]
#
# @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 is_project_enabled(name, is_enabled_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:isEnabled', options)
command.request_representation = Google::Apis::BigquerydatatransferV1::IsEnabledRequest::Representation
command.request_object = is_enabled_request_object
command.response_representation = Google::Apis::BigquerydatatransferV1::IsEnabledResponse::Representation
command.response_class = Google::Apis::BigquerydatatransferV1::IsEnabledResponse
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
# Enables or disables data transfer for a project. This
# method requires the additional scope of
# 'https://www.googleapis.com/auth/cloudplatformprojects'
# to manage the cloud project permissions.
# @param [String] name
# The name of the project resource in the form:
# `projects/`project_id``
# @param [Google::Apis::BigquerydatatransferV1::SetEnabledRequest] set_enabled_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::BigquerydatatransferV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigquerydatatransferV1::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 set_project_enabled(name, set_enabled_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:setEnabled', options)
command.request_representation = Google::Apis::BigquerydatatransferV1::SetEnabledRequest::Representation
command.request_object = set_enabled_request_object
command.response_representation = Google::Apis::BigquerydatatransferV1::Empty::Representation
command.response_class = Google::Apis::BigquerydatatransferV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns true if valid credentials exist for the given data source and
# requesting user.
# Some data sources doesn't support service account, so we need to talk to
# them on behalf of the end user. This API just checks whether we have OAuth
# token for the particular user, which is a pre-requisite before user can
# create a transfer config.
# @param [String] name
# The data source in the form:
# `projects/`project_id`/dataSources/`data_source_id``
@ -258,40 +191,6 @@ module Google
execute_or_queue_command(command, &block)
end
# Returns true if data transfer is enabled for a project.
# @param [String] name
# The name of the project resource in the form:
# `projects/`project_id``
# @param [Google::Apis::BigquerydatatransferV1::IsEnabledRequest] is_enabled_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::BigquerydatatransferV1::IsEnabledResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigquerydatatransferV1::IsEnabledResponse]
#
# @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 is_location_enabled(name, is_enabled_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:isEnabled', options)
command.request_representation = Google::Apis::BigquerydatatransferV1::IsEnabledRequest::Representation
command.request_object = is_enabled_request_object
command.response_representation = Google::Apis::BigquerydatatransferV1::IsEnabledResponse::Representation
command.response_class = Google::Apis::BigquerydatatransferV1::IsEnabledResponse
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 information about the supported locations for this service.
# @param [String] name
# The resource that owns the locations collection, if applicable.
@ -331,45 +230,12 @@ module Google
execute_or_queue_command(command, &block)
end
# Enables or disables data transfer for a project. This
# method requires the additional scope of
# 'https://www.googleapis.com/auth/cloudplatformprojects'
# to manage the cloud project permissions.
# @param [String] name
# The name of the project resource in the form:
# `projects/`project_id``
# @param [Google::Apis::BigquerydatatransferV1::SetEnabledRequest] set_enabled_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::BigquerydatatransferV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::BigquerydatatransferV1::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 set_location_enabled(name, set_enabled_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:setEnabled', options)
command.request_representation = Google::Apis::BigquerydatatransferV1::SetEnabledRequest::Representation
command.request_object = set_enabled_request_object
command.response_representation = Google::Apis::BigquerydatatransferV1::Empty::Representation
command.response_class = Google::Apis::BigquerydatatransferV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns true if valid credentials exist for the given data source and
# requesting user.
# Some data sources doesn't support service account, so we need to talk to
# them on behalf of the end user. This API just checks whether we have OAuth
# token for the particular user, which is a pre-requisite before user can
# create a transfer config.
# @param [String] name
# The data source in the form:
# `projects/`project_id`/dataSources/`data_source_id``
@ -643,11 +509,12 @@ module Google
# Updates a data transfer configuration.
# All fields must be set, even if they are not updated.
# @param [String] name
# The resource name of the transfer run.
# Transfer run names have the form
# The resource name of the transfer config.
# Transfer config names have the form
# `projects/`project_id`/transferConfigs/`config_id``.
# Where `config_id` is usually a uuid, even though it is not
# guaranteed or required. The name is ignored when creating a transfer run.
# guaranteed or required. The name is ignored when creating a transfer
# config.
# @param [Google::Apis::BigquerydatatransferV1::TransferConfig] transfer_config_object
# @param [String] authorization_code
# Optional OAuth2 authorization code to use with this transfer configuration.
@ -1057,11 +924,12 @@ module Google
# Updates a data transfer configuration.
# All fields must be set, even if they are not updated.
# @param [String] name
# The resource name of the transfer run.
# Transfer run names have the form
# The resource name of the transfer config.
# Transfer config names have the form
# `projects/`project_id`/transferConfigs/`config_id``.
# Where `config_id` is usually a uuid, even though it is not
# guaranteed or required. The name is ignored when creating a transfer run.
# guaranteed or required. The name is ignored when creating a transfer
# config.
# @param [Google::Apis::BigquerydatatransferV1::TransferConfig] transfer_config_object
# @param [String] authorization_code
# Optional OAuth2 authorization code to use with this transfer configuration.

View File

@ -12,27 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/testing_v1/service.rb'
require 'google/apis/testing_v1/classes.rb'
require 'google/apis/testing_v1/representations.rb'
require 'google/apis/cloudtasks_v2beta2/service.rb'
require 'google/apis/cloudtasks_v2beta2/classes.rb'
require 'google/apis/cloudtasks_v2beta2/representations.rb'
module Google
module Apis
# Google Cloud Testing API
# Cloud Tasks API
#
# Allows developers to run automated tests for their mobile applications on
# Google infrastructure.
# Cloud Tasks enables developers to manage the execution of large numbers of
# distributed requests. Cloud Tasks is in Alpha.
#
# @see https://developers.google.com/cloud-test-lab/
module TestingV1
VERSION = 'V1'
REVISION = '20170905'
# @see https://cloud.google.com/cloud-tasks/
module CloudtasksV2beta2
VERSION = 'V2beta2'
REVISION = '20170912'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# View your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,554 @@
# 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 CloudtasksV2beta2
class AcknowledgeTaskRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AppEngineHttpRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AppEngineHttpTarget
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AppEngineQueueConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AppEngineRouting
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AppEngineTaskTarget
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AttemptStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Binding
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CancelLeaseRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CreateTaskRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListQueuesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListTasksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PauseQueueRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Policy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PullMessage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PullQueueConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PullTarget
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PullTaskTarget
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PullTasksRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PullTasksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PurgeQueueRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Queue
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RenewLeaseRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ResumeQueueRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RetryConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RunTaskRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Status
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Task
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TaskStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestIamPermissionsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestIamPermissionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ThrottleConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AcknowledgeTaskRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :schedule_time, as: 'scheduleTime'
end
end
class AppEngineHttpRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_engine_routing, as: 'appEngineRouting', class: Google::Apis::CloudtasksV2beta2::AppEngineRouting, decorator: Google::Apis::CloudtasksV2beta2::AppEngineRouting::Representation
hash :headers, as: 'headers'
property :http_method, as: 'httpMethod'
property :payload, :base64 => true, as: 'payload'
property :relative_url, as: 'relativeUrl'
end
end
class AppEngineHttpTarget
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_engine_routing_override, as: 'appEngineRoutingOverride', class: Google::Apis::CloudtasksV2beta2::AppEngineRouting, decorator: Google::Apis::CloudtasksV2beta2::AppEngineRouting::Representation
end
end
class AppEngineQueueConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_engine_routing_override, as: 'appEngineRoutingOverride', class: Google::Apis::CloudtasksV2beta2::AppEngineRouting, decorator: Google::Apis::CloudtasksV2beta2::AppEngineRouting::Representation
end
end
class AppEngineRouting
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :host, as: 'host'
property :instance, as: 'instance'
property :service, as: 'service'
property :version, as: 'version'
end
end
class AppEngineTaskTarget
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_engine_routing, as: 'appEngineRouting', class: Google::Apis::CloudtasksV2beta2::AppEngineRouting, decorator: Google::Apis::CloudtasksV2beta2::AppEngineRouting::Representation
hash :headers, as: 'headers'
property :http_method, as: 'httpMethod'
property :payload, :base64 => true, as: 'payload'
property :relative_url, as: 'relativeUrl'
end
end
class AttemptStatus
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dispatch_time, as: 'dispatchTime'
property :response_status, as: 'responseStatus', class: Google::Apis::CloudtasksV2beta2::Status, decorator: Google::Apis::CloudtasksV2beta2::Status::Representation
property :response_time, as: 'responseTime'
property :schedule_time, as: 'scheduleTime'
end
end
class Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :members, as: 'members'
property :role, as: 'role'
end
end
class CancelLeaseRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :response_view, as: 'responseView'
property :schedule_time, as: 'scheduleTime'
end
end
class CreateTaskRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :response_view, as: 'responseView'
property :task, as: 'task', class: Google::Apis::CloudtasksV2beta2::Task, decorator: Google::Apis::CloudtasksV2beta2::Task::Representation
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class GetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class ListQueuesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, :base64 => true, as: 'nextPageToken'
collection :queues, as: 'queues', class: Google::Apis::CloudtasksV2beta2::Queue, decorator: Google::Apis::CloudtasksV2beta2::Queue::Representation
end
end
class ListTasksResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, :base64 => true, as: 'nextPageToken'
collection :tasks, as: 'tasks', class: Google::Apis::CloudtasksV2beta2::Task, decorator: Google::Apis::CloudtasksV2beta2::Task::Representation
end
end
class PauseQueueRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :bindings, as: 'bindings', class: Google::Apis::CloudtasksV2beta2::Binding, decorator: Google::Apis::CloudtasksV2beta2::Binding::Representation
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
end
end
class PullMessage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :payload, :base64 => true, as: 'payload'
property :tag, :base64 => true, as: 'tag'
end
end
class PullQueueConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class PullTarget
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class PullTaskTarget
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :payload, :base64 => true, as: 'payload'
property :tag, :base64 => true, as: 'tag'
end
end
class PullTasksRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :filter, as: 'filter'
property :lease_duration, as: 'leaseDuration'
property :max_tasks, as: 'maxTasks'
property :response_view, as: 'responseView'
end
end
class PullTasksResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :tasks, as: 'tasks', class: Google::Apis::CloudtasksV2beta2::Task, decorator: Google::Apis::CloudtasksV2beta2::Task::Representation
end
end
class PurgeQueueRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Queue
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_engine_http_target, as: 'appEngineHttpTarget', class: Google::Apis::CloudtasksV2beta2::AppEngineHttpTarget, decorator: Google::Apis::CloudtasksV2beta2::AppEngineHttpTarget::Representation
property :app_engine_queue_config, as: 'appEngineQueueConfig', class: Google::Apis::CloudtasksV2beta2::AppEngineQueueConfig, decorator: Google::Apis::CloudtasksV2beta2::AppEngineQueueConfig::Representation
property :name, as: 'name'
property :pull_queue_config, as: 'pullQueueConfig', class: Google::Apis::CloudtasksV2beta2::PullQueueConfig, decorator: Google::Apis::CloudtasksV2beta2::PullQueueConfig::Representation
property :pull_target, as: 'pullTarget', class: Google::Apis::CloudtasksV2beta2::PullTarget, decorator: Google::Apis::CloudtasksV2beta2::PullTarget::Representation
property :purge_time, as: 'purgeTime'
property :queue_state, as: 'queueState'
property :retry_config, as: 'retryConfig', class: Google::Apis::CloudtasksV2beta2::RetryConfig, decorator: Google::Apis::CloudtasksV2beta2::RetryConfig::Representation
property :throttle_config, as: 'throttleConfig', class: Google::Apis::CloudtasksV2beta2::ThrottleConfig, decorator: Google::Apis::CloudtasksV2beta2::ThrottleConfig::Representation
end
end
class RenewLeaseRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :new_lease_duration, as: 'newLeaseDuration'
property :response_view, as: 'responseView'
property :schedule_time, as: 'scheduleTime'
end
end
class ResumeQueueRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class RetryConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max_attempts, as: 'maxAttempts'
property :max_backoff, as: 'maxBackoff'
property :max_doublings, as: 'maxDoublings'
property :min_backoff, as: 'minBackoff'
property :task_age_limit, as: 'taskAgeLimit'
property :unlimited_attempts, as: 'unlimitedAttempts'
end
end
class RunTaskRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :response_view, as: 'responseView'
end
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :policy, as: 'policy', class: Google::Apis::CloudtasksV2beta2::Policy, decorator: Google::Apis::CloudtasksV2beta2::Policy::Representation
end
end
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :details, as: 'details'
property :message, as: 'message'
end
end
class Task
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_engine_http_request, as: 'appEngineHttpRequest', class: Google::Apis::CloudtasksV2beta2::AppEngineHttpRequest, decorator: Google::Apis::CloudtasksV2beta2::AppEngineHttpRequest::Representation
property :app_engine_task_target, as: 'appEngineTaskTarget', class: Google::Apis::CloudtasksV2beta2::AppEngineTaskTarget, decorator: Google::Apis::CloudtasksV2beta2::AppEngineTaskTarget::Representation
property :create_time, as: 'createTime'
property :name, as: 'name'
property :pull_message, as: 'pullMessage', class: Google::Apis::CloudtasksV2beta2::PullMessage, decorator: Google::Apis::CloudtasksV2beta2::PullMessage::Representation
property :pull_task_target, as: 'pullTaskTarget', class: Google::Apis::CloudtasksV2beta2::PullTaskTarget, decorator: Google::Apis::CloudtasksV2beta2::PullTaskTarget::Representation
property :schedule_time, as: 'scheduleTime'
property :task_status, as: 'taskStatus', class: Google::Apis::CloudtasksV2beta2::TaskStatus, decorator: Google::Apis::CloudtasksV2beta2::TaskStatus::Representation
property :view, as: 'view'
end
end
class TaskStatus
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :attempt_dispatch_count, :numeric_string => true, as: 'attemptDispatchCount'
property :attempt_response_count, :numeric_string => true, as: 'attemptResponseCount'
property :first_attempt_status, as: 'firstAttemptStatus', class: Google::Apis::CloudtasksV2beta2::AttemptStatus, decorator: Google::Apis::CloudtasksV2beta2::AttemptStatus::Representation
property :last_attempt_status, as: 'lastAttemptStatus', class: Google::Apis::CloudtasksV2beta2::AttemptStatus, decorator: Google::Apis::CloudtasksV2beta2::AttemptStatus::Representation
end
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class TestIamPermissionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class ThrottleConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max_burst_size, as: 'maxBurstSize'
property :max_outstanding_tasks, as: 'maxOutstandingTasks'
property :max_tasks_dispatched_per_second, as: 'maxTasksDispatchedPerSecond'
end
end
end
end
end

View File

@ -0,0 +1,947 @@
# 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 CloudtasksV2beta2
# Cloud Tasks API
#
# Cloud Tasks enables developers to manage the execution of large numbers of
# distributed requests. Cloud Tasks is in Alpha.
#
# @example
# require 'google/apis/cloudtasks_v2beta2'
#
# Cloudtasks = Google::Apis::CloudtasksV2beta2 # Alias the module
# service = Cloudtasks::CloudTasksService.new
#
# @see https://cloud.google.com/cloud-tasks/
class CloudTasksService < 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://cloudtasks.googleapis.com/', '')
@batch_path = 'batch'
end
# Creates a queue.
# WARNING: This method is only available to whitelisted
# users. Using this method carries some risk. Read
# [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
# carefully and then sign up for
# [whitelist access to this method](https://goo.gl/Fe5mUy).
# @param [String] parent
# Required.
# The location name in which the queue will be created.
# For example: `projects/PROJECT_ID/locations/LOCATION_ID`
# The list of allowed locations can be obtained by calling Cloud
# Tasks' implementation of
# google.cloud.location.Locations.ListLocations.
# @param [Google::Apis::CloudtasksV2beta2::Queue] queue_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::CloudtasksV2beta2::Queue] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Queue]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_queue(parent, queue_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+parent}/queues', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::Queue::Representation
command.request_object = queue_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Queue::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Queue
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a queue.
# This command will delete the queue even if it has tasks in it.
# Note: If you delete a queue, a queue with the same name can't be created
# for 7 days.
# WARNING: This method is only available to whitelisted
# users. Using this method carries some risk. Read
# [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
# carefully and then sign up for
# [whitelist access to this method](https://goo.gl/Fe5mUy).
# @param [String] name
# Required.
# The queue name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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::CloudtasksV2beta2::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_location_queue(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2beta2/{+name}', options)
command.response_representation = Google::Apis::CloudtasksV2beta2::Empty::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::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 a queue.
# @param [String] name
# Required.
# The resource name of the queue. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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::CloudtasksV2beta2::Queue] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Queue]
#
# @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_queue(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta2/{+name}', options)
command.response_representation = Google::Apis::CloudtasksV2beta2::Queue::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Queue
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 Queue.
# Returns an empty policy if the resource exists and does not have a policy
# set.
# Authorization requires the following [Google IAM](/iam) permission on the
# specified resource parent:
# * `cloudtasks.queues.getIamPolicy`
# @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::CloudtasksV2beta2::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::CloudtasksV2beta2::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::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_queue_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+resource}:getIamPolicy', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Policy::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::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 queues.
# Queues are returned in lexicographical order.
# @param [String] parent
# Required.
# The location name.
# For example: `projects/PROJECT_ID/locations/LOCATION_ID`
# @param [String] filter
# `filter` can be used to specify a subset of queues. Any Queue
# field can be used as a filter and several operators as supported.
# For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
# described in
# [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
# Sample filter "app_engine_http_target: *".
# Note that using filters might cause fewer queues than the
# requested_page size to be returned.
# @param [Fixnum] page_size
# Requested page size.
# The maximum page size is 9800. If unspecified, the page size will
# be the maximum. Fewer queues than requested might be returned,
# even if more queues exist; use
# ListQueuesResponse.next_page_token to determine if more
# queues exist.
# @param [String] page_token
# A token identifying the page of results to return.
# To request the first page results, page_token must be empty. To
# request the next page of results, page_token must be the value of
# ListQueuesResponse.next_page_token returned from the previous
# call to CloudTasks.ListQueues method. It is an error to
# switch the value of ListQueuesRequest.filter while iterating
# through pages.
# @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::CloudtasksV2beta2::ListQueuesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::ListQueuesResponse]
#
# @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_queues(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta2/{+parent}/queues', options)
command.response_representation = Google::Apis::CloudtasksV2beta2::ListQueuesResponse::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::ListQueuesResponse
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 a queue.
# This method creates the queue if it does not exist and updates
# the queue if it does exist.
# WARNING: This method is only available to whitelisted
# users. Using this method carries some risk. Read
# [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
# carefully and then sign up for
# [whitelist access to this method](https://goo.gl/Fe5mUy).
# @param [String] name
# The queue name.
# The queue name must have the following format:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
# * `PROJECT_ID` can contain uppercase and lowercase letters,
# numbers, hyphens, colons, and periods; that is, it must match
# the regular expression: `[a-zA-Z\\d-:\\.]+`.
# * `QUEUE_ID` can contain uppercase and lowercase letters,
# numbers, and hyphens; that is, it must match the regular
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
# characters.
# Caller-specified and required in CreateQueueRequest, after which
# it becomes output only.
# @param [Google::Apis::CloudtasksV2beta2::Queue] queue_object
# @param [String] update_mask
# A mask used to specify which fields of the queue are being updated.
# If empty, then all fields will be updated.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudtasksV2beta2::Queue] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Queue]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_project_location_queue(name, queue_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v2beta2/{+name}', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::Queue::Representation
command.request_object = queue_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Queue::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Queue
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
# Pauses the queue.
# If a queue is paused then the system will stop executing the
# tasks in the queue until it is resumed via
# CloudTasks.ResumeQueue. Tasks can still be added when the
# queue is paused. The state of the queue is stored in
# Queue.queue_state; if paused it will be set to
# Queue.QueueState.PAUSED.
# WARNING: This method is only available to whitelisted
# users. Using this method carries some risk. Read
# [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
# carefully and then sign up for
# [whitelist access to this method](https://goo.gl/Fe5mUy).
# @param [String] name
# Required.
# The queue name. For example:
# `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
# @param [Google::Apis::CloudtasksV2beta2::PauseQueueRequest] pause_queue_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::CloudtasksV2beta2::Queue] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Queue]
#
# @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 pause_queue(name, pause_queue_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+name}:pause', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::PauseQueueRequest::Representation
command.request_object = pause_queue_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Queue::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Queue
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
# Purges a queue by deleting all of its tasks.
# All tasks created before this method is called are permanently deleted.
# Purge operations can take up to one minute to take effect. Tasks
# might be dispatched before the purge takes effect. A purge is irreversible.
# @param [String] name
# Required.
# The queue name. For example:
# `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
# @param [Google::Apis::CloudtasksV2beta2::PurgeQueueRequest] purge_queue_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::CloudtasksV2beta2::Queue] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Queue]
#
# @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 purge_queue(name, purge_queue_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+name}:purge', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::PurgeQueueRequest::Representation
command.request_object = purge_queue_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Queue::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Queue
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
# Resume a queue.
# This method resumes a queue after it has been
# Queue.QueueState.PAUSED or Queue.QueueState.DISABLED. The state of
# a queue is stored in Queue.queue_state; after calling this method it
# will be set to Queue.QueueState.RUNNING.
# WARNING: This method is only available to whitelisted
# users. Using this method carries some risk. Read
# [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
# carefully and then sign up for
# [whitelist access to this method](https://goo.gl/Fe5mUy).
# WARNING: Resuming many high-QPS queues at the same time can
# lead to target overloading. If you are resuming high-QPS
# queues, follow the 500/50/5 pattern described in
# [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-
# scaling-risks-2017-06-05.pdf).
# @param [String] name
# Required.
# The queue name. For example:
# `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
# @param [Google::Apis::CloudtasksV2beta2::ResumeQueueRequest] resume_queue_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::CloudtasksV2beta2::Queue] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Queue]
#
# @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 resume_queue(name, resume_queue_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+name}:resume', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::ResumeQueueRequest::Representation
command.request_object = resume_queue_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Queue::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Queue
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
# Sets the access control policy for a Queue. Replaces any existing
# policy.
# Authorization requires the following [Google IAM](/iam) permission on the
# specified resource parent:
# * `cloudtasks.queues.setIamPolicy`
# @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::CloudtasksV2beta2::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::CloudtasksV2beta2::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::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_queue_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Policy::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::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 permissions that a caller has on a Queue.
# If the resource does not exist, this will return an empty set of
# permissions, not a google.rpc.Code.NOT_FOUND error.
# Note: This operation is designed to be used for building permission-aware
# UIs and command-line tools, not for authorization checking. This operation
# may "fail open" without warning.
# @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::CloudtasksV2beta2::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::CloudtasksV2beta2::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::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_queue_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::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
# Acknowledges a pull task.
# The lease holder, that is, the entity that received this task in
# a PullTasksResponse, must call this method to indicate that
# the work associated with the task has finished.
# The lease holder must acknowledge a task within the
# PullTasksRequest.lease_duration or the lease will expire and
# the task will become ready to be returned in a different
# PullTasksResponse. After the task is acknowledged, it will
# not be returned by a later CloudTasks.PullTasks,
# CloudTasks.GetTask, or CloudTasks.ListTasks.
# @param [String] name
# Required.
# The task name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
# @param [Google::Apis::CloudtasksV2beta2::AcknowledgeTaskRequest] acknowledge_task_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::CloudtasksV2beta2::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::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 acknowledge_task(name, acknowledge_task_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+name}:acknowledge', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::AcknowledgeTaskRequest::Representation
command.request_object = acknowledge_task_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Empty::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::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
# Cancel a pull task's lease.
# The lease holder can use this method to cancel a task's lease
# by setting Task.schedule_time to now. This will make the task
# available to be leased to the next caller of CloudTasks.PullTasks.
# @param [String] name
# Required.
# The task name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
# @param [Google::Apis::CloudtasksV2beta2::CancelLeaseRequest] cancel_lease_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::CloudtasksV2beta2::Task] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Task]
#
# @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_task_lease(name, cancel_lease_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+name}:cancelLease', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::CancelLeaseRequest::Representation
command.request_object = cancel_lease_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Task::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Task
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
# Creates a task and adds it to a queue.
# To add multiple tasks at the same time, use
# [HTTP batching](/storage/docs/json_api/v1/how-tos/batch)
# or the batching documentation for your client library, for example
# https://developers.google.com/api-client-library/python/guide/batch.
# Tasks cannot be updated after creation; there is no UpdateTask command.
# @param [String] parent
# Required.
# The queue name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
# The queue must already exist.
# @param [Google::Apis::CloudtasksV2beta2::CreateTaskRequest] create_task_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::CloudtasksV2beta2::Task] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Task]
#
# @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_task(parent, create_task_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+parent}/tasks', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::CreateTaskRequest::Representation
command.request_object = create_task_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Task::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Task
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a task.
# A task can be deleted if it is scheduled or dispatched. A task
# cannot be deleted if it has completed successfully or permanently
# failed.
# @param [String] name
# Required.
# The task name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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::CloudtasksV2beta2::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_location_queue_task(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2beta2/{+name}', options)
command.response_representation = Google::Apis::CloudtasksV2beta2::Empty::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::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 a task.
# @param [String] name
# Required.
# The task name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
# @param [String] response_view
# The response_view specifies which subset of the Task will be
# returned.
# By default response_view is Task.View.BASIC; not all
# information is retrieved by default because some data, such as
# payloads, might be desirable to return only when needed because
# of its large size or because of the sensitivity of data that it
# contains.
# Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView`
# [Google IAM](/iam/) permission on the
# Task.name 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::CloudtasksV2beta2::Task] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Task]
#
# @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_queue_task(name, response_view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta2/{+name}', options)
command.response_representation = Google::Apis::CloudtasksV2beta2::Task::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Task
command.params['name'] = name unless name.nil?
command.query['responseView'] = response_view unless response_view.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 the tasks in a queue.
# By default response_view is Task.View.BASIC; not all
# information is retrieved by default due to performance
# considerations; ListTasksRequest.response_view controls the
# subset of information which is returned.
# @param [String] parent
# Required.
# The queue name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
# @param [String] order_by
# Sort order used for the query. The fields supported for sorting
# are Task.schedule_time and PullTaskTarget.tag. All results will be
# returned in ascending order. The default ordering is by
# Task.schedule_time.
# @param [Fixnum] page_size
# Requested page size. Fewer tasks than requested might be returned.
# The maximum page size is 1000. If unspecified, the page size will
# be the maximum. Fewer tasks than requested might be returned,
# even if more tasks exist; use
# ListTasksResponse.next_page_token to determine if more tasks
# exist.
# @param [String] page_token
# A token identifying the page of results to return.
# To request the first page results, page_token must be empty. To
# request the next page of results, page_token must be the value of
# ListTasksResponse.next_page_token returned from the previous
# call to CloudTasks.ListTasks method.
# The page token is valid for only 2 hours.
# @param [String] response_view
# The response_view specifies which subset of the Task will be
# returned.
# By default response_view is Task.View.BASIC; not all
# information is retrieved by default because some data, such as
# payloads, might be desirable to return only when needed because
# of its large size or because of the sensitivity of data that it
# contains.
# Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView`
# [Google IAM](/iam/) permission on the
# Task.name 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::CloudtasksV2beta2::ListTasksResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::ListTasksResponse]
#
# @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_queue_tasks(parent, order_by: nil, page_size: nil, page_token: nil, response_view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta2/{+parent}/tasks', options)
command.response_representation = Google::Apis::CloudtasksV2beta2::ListTasksResponse::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::ListTasksResponse
command.params['parent'] = parent unless parent.nil?
command.query['orderBy'] = order_by unless order_by.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['responseView'] = response_view unless response_view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Pulls tasks from a pull queue and acquires a lease on them for a
# specified PullTasksRequest.lease_duration.
# This method is invoked by the lease holder to obtain the
# lease. The lease holder must acknowledge the task via
# CloudTasks.AcknowledgeTask after they have performed the work
# associated with the task.
# The payload is intended to store data that the lease holder needs
# to perform the work associated with the task. To return the
# payloads in the PullTasksResponse, set
# PullTasksRequest.response_view to Task.View.FULL.
# @param [String] name
# Required.
# The queue name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
# @param [Google::Apis::CloudtasksV2beta2::PullTasksRequest] pull_tasks_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::CloudtasksV2beta2::PullTasksResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::PullTasksResponse]
#
# @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 pull_tasks(name, pull_tasks_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+name}/tasks:pull', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::PullTasksRequest::Representation
command.request_object = pull_tasks_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::PullTasksResponse::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::PullTasksResponse
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
# Renew the current lease of a pull task.
# The lease holder can use this method to extend the lease by a new
# duration, starting from now. The new task lease will be
# returned in Task.schedule_time.
# @param [String] name
# Required.
# The task name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
# @param [Google::Apis::CloudtasksV2beta2::RenewLeaseRequest] renew_lease_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::CloudtasksV2beta2::Task] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Task]
#
# @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 renew_task_lease(name, renew_lease_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+name}:renewLease', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::RenewLeaseRequest::Representation
command.request_object = renew_lease_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Task::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Task
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
# Forces a task to run now.
# This command is meant to be used for manual debugging. For
# example, CloudTasks.RunTask can be used to retry a failed
# task after a fix has been made or to manually force a task to be
# dispatched now.
# When this method is called, Cloud Tasks will dispatch the task to its
# target, even if the queue is Queue.QueueState.PAUSED.
# The dispatched task is returned. That is, the task that is returned
# contains the Task.task_status after the task is dispatched but
# before the task is received by its target.
# If Cloud Tasks receives a successful response from the task's
# handler, then the task will be deleted; otherwise the task's
# Task.schedule_time will be reset to the time that
# CloudTasks.RunTask was called plus the retry delay specified
# in the queue and task's RetryConfig.
# CloudTasks.RunTask returns google.rpc.Code.NOT_FOUND when
# it is called on a task that has already succeeded or permanently
# failed. google.rpc.Code.FAILED_PRECONDITION is returned when
# CloudTasks.RunTask is called on task that is dispatched or
# already running.
# @param [String] name
# Required.
# The task name. For example:
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
# @param [Google::Apis::CloudtasksV2beta2::RunTaskRequest] run_task_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::CloudtasksV2beta2::Task] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudtasksV2beta2::Task]
#
# @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 run_task(name, run_task_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta2/{+name}:run', options)
command.request_representation = Google::Apis::CloudtasksV2beta2::RunTaskRequest::Representation
command.request_object = run_task_request_object
command.response_representation = Google::Apis::CloudtasksV2beta2::Task::Representation
command.response_class = Google::Apis::CloudtasksV2beta2::Task
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

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/compute/docs/reference/latest/
module ComputeAlpha
VERSION = 'Alpha'
REVISION = '20170821'
REVISION = '20170905'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

File diff suppressed because it is too large Load Diff

View File

@ -358,6 +358,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class BackendServiceFailoverPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BackendServiceGroupHealth
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -2164,6 +2170,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ProjectsSetDefaultNetworkTierRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ProjectsSetDefaultServiceAccountRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -2590,7 +2602,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SecurityPoliciesList
class SecurityPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SecurityPolicyList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Warning
@ -2608,12 +2626,6 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SecurityPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SecurityPolicyReference
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -2704,6 +2716,54 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SslPoliciesList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
class SslPoliciesListAvailableFeaturesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SslPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
class SslPolicyReference
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Subnetwork
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -3226,6 +3286,30 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class UsableSubnetwork
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UsableSubnetworksAggregatedList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
class UsageExportLocation
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -3848,8 +3932,10 @@ module Google
property :failover, as: 'failover'
property :group, as: 'group'
property :max_connections, as: 'maxConnections'
property :max_connections_per_endpoint, as: 'maxConnectionsPerEndpoint'
property :max_connections_per_instance, as: 'maxConnectionsPerInstance'
property :max_rate, as: 'maxRate'
property :max_rate_per_endpoint, as: 'maxRatePerEndpoint'
property :max_rate_per_instance, as: 'maxRatePerInstance'
property :max_utilization, as: 'maxUtilization'
end
@ -3925,7 +4011,8 @@ module Google
collection :custom_request_headers, as: 'customRequestHeaders'
property :description, as: 'description'
property :enable_cdn, as: 'enableCDN'
property :failover_ratio, as: 'failoverRatio'
property :failover_policy, as: 'failoverPolicy', class: Google::Apis::ComputeAlpha::BackendServiceFailoverPolicy, decorator: Google::Apis::ComputeAlpha::BackendServiceFailoverPolicy::Representation
property :fingerprint, :base64 => true, as: 'fingerprint'
collection :health_checks, as: 'healthChecks'
property :iap, as: 'iap', class: Google::Apis::ComputeAlpha::BackendServiceIap, decorator: Google::Apis::ComputeAlpha::BackendServiceIap::Representation
@ -3987,6 +4074,15 @@ module Google
end
end
class BackendServiceFailoverPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :disable_connection_drain_on_failover, as: 'disableConnectionDrainOnFailover'
property :drop_traffic_if_unhealthy, as: 'dropTrafficIfUnhealthy'
property :failover_ratio, as: 'failoverRatio'
end
end
class BackendServiceGroupHealth
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -4633,6 +4729,7 @@ module Google
property :backend_service, as: 'backendService'
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :fingerprint, :base64 => true, as: 'fingerprint'
property :id, :numeric_string => true, as: 'id'
property :ip_version, as: 'ipVersion'
property :kind, as: 'kind'
@ -4783,6 +4880,7 @@ module Google
property :host, as: 'host'
property :port, as: 'port'
property :port_name, as: 'portName'
property :port_specification, as: 'portSpecification'
property :proxy_header, as: 'proxyHeader'
property :request_path, as: 'requestPath'
property :response, as: 'response'
@ -4795,6 +4893,7 @@ module Google
property :host, as: 'host'
property :port, as: 'port'
property :port_name, as: 'portName'
property :port_specification, as: 'portSpecification'
property :proxy_header, as: 'proxyHeader'
property :request_path, as: 'requestPath'
property :response, as: 'response'
@ -4807,6 +4906,7 @@ module Google
property :host, as: 'host'
property :port, as: 'port'
property :port_name, as: 'portName'
property :port_specification, as: 'portSpecification'
property :proxy_header, as: 'proxyHeader'
property :request_path, as: 'requestPath'
property :response, as: 'response'
@ -5321,6 +5421,7 @@ module Google
property :can_ip_forward, as: 'canIpForward'
property :cpu_platform, as: 'cpuPlatform'
property :creation_timestamp, as: 'creationTimestamp'
property :deletion_protection, as: 'deletionProtection'
property :description, as: 'description'
collection :disks, as: 'disks', class: Google::Apis::ComputeAlpha::AttachedDisk, decorator: Google::Apis::ComputeAlpha::AttachedDisk::Representation
@ -7268,6 +7369,7 @@ module Google
property :common_instance_metadata, as: 'commonInstanceMetadata', class: Google::Apis::ComputeAlpha::Metadata, decorator: Google::Apis::ComputeAlpha::Metadata::Representation
property :creation_timestamp, as: 'creationTimestamp'
property :default_network_tier, as: 'defaultNetworkTier'
property :default_service_account, as: 'defaultServiceAccount'
property :description, as: 'description'
collection :enabled_features, as: 'enabledFeatures'
@ -7316,6 +7418,13 @@ module Google
end
end
class ProjectsSetDefaultNetworkTierRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :network_tier, as: 'networkTier'
end
end
class ProjectsSetDefaultServiceAccountRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -8041,6 +8150,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
property :port, as: 'port'
property :port_name, as: 'portName'
property :port_specification, as: 'portSpecification'
property :proxy_header, as: 'proxyHeader'
property :request, as: 'request'
property :response, as: 'response'
@ -8056,37 +8166,6 @@ module Google
end
end
class SecurityPoliciesList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeAlpha::SecurityPolicy, decorator: Google::Apis::ComputeAlpha::SecurityPolicy::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :warning, as: 'warning', class: Google::Apis::ComputeAlpha::SecurityPoliciesList::Warning, decorator: Google::Apis::ComputeAlpha::SecurityPoliciesList::Warning::Representation
end
class Warning
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ComputeAlpha::SecurityPoliciesList::Warning::Datum, decorator: Google::Apis::ComputeAlpha::SecurityPoliciesList::Warning::Datum::Representation
property :message, as: 'message'
end
class Datum
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
class SecurityPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -8102,6 +8181,37 @@ module Google
end
end
class SecurityPolicyList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeAlpha::SecurityPolicy, decorator: Google::Apis::ComputeAlpha::SecurityPolicy::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :warning, as: 'warning', class: Google::Apis::ComputeAlpha::SecurityPolicyList::Warning, decorator: Google::Apis::ComputeAlpha::SecurityPolicyList::Warning::Representation
end
class Warning
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ComputeAlpha::SecurityPolicyList::Warning::Datum, decorator: Google::Apis::ComputeAlpha::SecurityPolicyList::Warning::Datum::Representation
property :message, as: 'message'
end
class Datum
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
class SecurityPolicyReference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -8271,6 +8381,89 @@ module Google
end
end
class SslPoliciesList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeAlpha::SslPolicy, decorator: Google::Apis::ComputeAlpha::SslPolicy::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
property :warning, as: 'warning', class: Google::Apis::ComputeAlpha::SslPoliciesList::Warning, decorator: Google::Apis::ComputeAlpha::SslPoliciesList::Warning::Representation
end
class Warning
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ComputeAlpha::SslPoliciesList::Warning::Datum, decorator: Google::Apis::ComputeAlpha::SslPoliciesList::Warning::Datum::Representation
property :message, as: 'message'
end
class Datum
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
class SslPoliciesListAvailableFeaturesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :features, as: 'features'
end
end
class SslPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_timestamp, as: 'creationTimestamp'
collection :custom_features, as: 'customFeatures'
property :description, as: 'description'
collection :enabled_features, as: 'enabledFeatures'
property :fingerprint, :base64 => true, as: 'fingerprint'
property :id, :numeric_string => true, as: 'id'
property :kind, as: 'kind'
property :min_tls_version, as: 'minTlsVersion'
property :name, as: 'name'
property :profile, as: 'profile'
property :self_link, as: 'selfLink'
collection :warnings, as: 'warnings', class: Google::Apis::ComputeAlpha::SslPolicy::Warning, decorator: Google::Apis::ComputeAlpha::SslPolicy::Warning::Representation
end
class Warning
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ComputeAlpha::SslPolicy::Warning::Datum, decorator: Google::Apis::ComputeAlpha::SslPolicy::Warning::Datum::Representation
property :message, as: 'message'
end
class Datum
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
class SslPolicyReference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ssl_policy, as: 'sslPolicy'
end
end
class Subnetwork
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -8411,6 +8604,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
property :port, as: 'port'
property :port_name, as: 'portName'
property :port_specification, as: 'portSpecification'
property :proxy_header, as: 'proxyHeader'
property :request, as: 'request'
property :response, as: 'response'
@ -8496,6 +8690,7 @@ module Google
property :quic_override, as: 'quicOverride'
property :self_link, as: 'selfLink'
collection :ssl_certificates, as: 'sslCertificates'
property :ssl_policy, as: 'sslPolicy'
property :url_map, as: 'urlMap'
end
end
@ -8831,6 +9026,7 @@ module Google
property :self_link, as: 'selfLink'
property :service, as: 'service'
collection :ssl_certificates, as: 'sslCertificates'
property :ssl_policy, as: 'sslPolicy'
end
end
@ -8934,6 +9130,8 @@ module Google
collection :forwarding_rules, as: 'forwardingRules'
property :id, :numeric_string => true, as: 'id'
property :kind, as: 'kind'
property :label_fingerprint, :base64 => true, as: 'labelFingerprint'
hash :labels, as: 'labels'
property :name, as: 'name'
property :network, as: 'network'
property :region, as: 'region'
@ -9165,6 +9363,45 @@ module Google
end
end
class UsableSubnetwork
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :subnetwork, as: 'subnetwork'
end
end
class UsableSubnetworksAggregatedList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeAlpha::UsableSubnetwork, decorator: Google::Apis::ComputeAlpha::UsableSubnetwork::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
property :warning, as: 'warning', class: Google::Apis::ComputeAlpha::UsableSubnetworksAggregatedList::Warning, decorator: Google::Apis::ComputeAlpha::UsableSubnetworksAggregatedList::Warning::Representation
end
class Warning
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ComputeAlpha::UsableSubnetworksAggregatedList::Warning::Datum, decorator: Google::Apis::ComputeAlpha::UsableSubnetworksAggregatedList::Warning::Datum::Representation
property :message, as: 'message'
end
class Datum
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
class UsageExportLocation
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -10178,6 +10178,62 @@ module Google
execute_or_queue_command(command, &block)
end
# Sets deletion protection on the instance.
# @param [String] project
# Project ID for this request.
# @param [String] zone
# The name of the zone for this request.
# @param [String] resource
# Name of the resource for this request.
# @param [Boolean] deletion_protection
# Whether the resource should be protected against deletion.
# @param [String] request_id
# An optional request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments.
# The request ID must be a valid UUID with the exception that zero UUID is not
# supported (00000000-0000-0000-0000-000000000000).
# @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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::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 set_instance_deletion_protection(project, zone, resource, deletion_protection: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{resource}/setDeletionProtection', options)
command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation
command.response_class = Google::Apis::ComputeAlpha::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['resource'] = resource unless resource.nil?
command.query['deletionProtection'] = deletion_protection unless deletion_protection.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Sets the auto-delete flag for a disk attached to an instance.
# @param [String] project
# Project ID for this request.
@ -14365,6 +14421,58 @@ module Google
execute_or_queue_command(command, &block)
end
# Sets the default network tier of the project. The default network tier is used
# when an address/forwardingRule/instance is created without specifying the
# network tier field.
# @param [String] project
# Project ID for this request.
# @param [Google::Apis::ComputeAlpha::ProjectsSetDefaultNetworkTierRequest] projects_set_default_network_tier_request_object
# @param [String] request_id
# An optional request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments.
# The request ID must be a valid UUID with the exception that zero UUID is not
# supported (00000000-0000-0000-0000-000000000000).
# @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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::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 set_project_default_network_tier(project, projects_set_default_network_tier_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/setDefaultNetworkTier', options)
command.request_representation = Google::Apis::ComputeAlpha::ProjectsSetDefaultNetworkTierRequest::Representation
command.request_object = projects_set_default_network_tier_request_object
command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation
command.response_class = Google::Apis::ComputeAlpha::Operation
command.params['project'] = project unless project.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Sets the default service account of the project. The default service account
# is used when a VM instance is created with the service account email address
# set to "default".
@ -18833,18 +18941,18 @@ module Google
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::SecurityPoliciesList] parsed result object
# @yieldparam result [Google::Apis::ComputeAlpha::SecurityPolicyList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::SecurityPoliciesList]
# @return [Google::Apis::ComputeAlpha::SecurityPolicyList]
#
# @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_security_policies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/global/securityPolicies', options)
command.response_representation = Google::Apis::ComputeAlpha::SecurityPoliciesList::Representation
command.response_class = Google::Apis::ComputeAlpha::SecurityPoliciesList
command.response_representation = Google::Apis::ComputeAlpha::SecurityPolicyList::Representation
command.response_class = Google::Apis::ComputeAlpha::SecurityPolicyList
command.params['project'] = project unless project.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
@ -19542,6 +19650,396 @@ module Google
execute_or_queue_command(command, &block)
end
# Deletes the specified SSL policy. The SSL policy resource can be deleted only
# if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.
# @param [String] project
# Project ID for this request.
# @param [String] ssl_policy
# Name of the SSL policy to delete. The name must be 1-63 characters long, and
# comply with RFC1035.
# @param [String] request_id
# An optional request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments.
# The request ID must be a valid UUID with the exception that zero UUID is not
# supported (00000000-0000-0000-0000-000000000000).
# @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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::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 delete_ssl_policy(project, ssl_policy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, '{project}/global/sslPolicies/{sslPolicy}', options)
command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation
command.response_class = Google::Apis::ComputeAlpha::Operation
command.params['project'] = project unless project.nil?
command.params['sslPolicy'] = ssl_policy unless ssl_policy.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List all of the ordered rules present in a single specified policy.
# @param [String] project
# Project ID for this request.
# @param [String] ssl_policy
# Name of the SSL policy to update. The name must be 1-63 characters long, and
# comply with RFC1035.
# @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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::SslPolicy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::SslPolicy]
#
# @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_ssl_policy(project, ssl_policy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/global/sslPolicies/{sslPolicy}', options)
command.response_representation = Google::Apis::ComputeAlpha::SslPolicy::Representation
command.response_class = Google::Apis::ComputeAlpha::SslPolicy
command.params['project'] = project unless project.nil?
command.params['sslPolicy'] = ssl_policy unless ssl_policy.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Returns the specified SSL policy resource. Get a list of available SSL
# policies by making a list() request.
# @param [String] project
# Project ID for this request.
# @param [Google::Apis::ComputeAlpha::SslPolicy] ssl_policy_object
# @param [String] request_id
# An optional request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments.
# The request ID must be a valid UUID with the exception that zero UUID is not
# supported (00000000-0000-0000-0000-000000000000).
# @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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::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 insert_ssl_policy(project, ssl_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/global/sslPolicies', options)
command.request_representation = Google::Apis::ComputeAlpha::SslPolicy::Representation
command.request_object = ssl_policy_object
command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation
command.response_class = Google::Apis::ComputeAlpha::Operation
command.params['project'] = project unless project.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List all the SSL policies that have been configured for the specified project.
# @param [String] project
# Project ID for this request.
# @param [String] filter
# Sets a filter `expression` for filtering listed resources. Your `expression`
# must be in the format: field_name comparison_string literal_string.
# The field_name is the name of the field you want to compare. Only atomic field
# types are supported (string, number, boolean). The comparison_string must be
# either eq (equals) or ne (not equals). The literal_string is the string value
# to filter to. The literal value must be valid for the type of field you are
# filtering by (string, number, boolean). For string fields, the literal value
# is interpreted as a regular expression using RE2 syntax. The literal value
# must match the entire field.
# For example, to filter for instances that do not have a name of example-
# instance, you would use name ne example-instance.
# You can filter on nested fields. For example, you could filter on instances
# that have set the scheduling.automaticRestart field to true. Use filtering on
# nested fields to take advantage of labels to organize and search for results
# based on label values.
# To filter on multiple expressions, provide each separate expression within
# parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-
# central1-f). Multiple expressions are treated as AND expressions, meaning that
# resources must match all expressions to pass the filters.
# @param [Fixnum] max_results
# The maximum number of results per page that should be returned. If the number
# of available results is larger than maxResults, Compute Engine returns a
# nextPageToken that can be used to get the next page of results in subsequent
# list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name.
# You can also sort results in descending order based on the creation timestamp
# using orderBy="creationTimestamp desc". This sorts results based on the
# creationTimestamp field in reverse chronological order (newest result first).
# Use this to sort resources like operations so that the newest operation is
# returned first.
# Currently, only sorting by name or creationTimestamp desc is supported.
# @param [String] page_token
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
# a previous list request to get the next 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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::SslPoliciesList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::SslPoliciesList]
#
# @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_ssl_policies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/global/sslPolicies', options)
command.response_representation = Google::Apis::ComputeAlpha::SslPoliciesList::Representation
command.response_class = Google::Apis::ComputeAlpha::SslPoliciesList
command.params['project'] = project unless project.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['orderBy'] = order_by unless order_by.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?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists all features that can be specified in the SSL policy when using custom
# profile.
# @param [String] project
# Project ID for this request.
# @param [String] filter
# Sets a filter `expression` for filtering listed resources. Your `expression`
# must be in the format: field_name comparison_string literal_string.
# The field_name is the name of the field you want to compare. Only atomic field
# types are supported (string, number, boolean). The comparison_string must be
# either eq (equals) or ne (not equals). The literal_string is the string value
# to filter to. The literal value must be valid for the type of field you are
# filtering by (string, number, boolean). For string fields, the literal value
# is interpreted as a regular expression using RE2 syntax. The literal value
# must match the entire field.
# For example, to filter for instances that do not have a name of example-
# instance, you would use name ne example-instance.
# You can filter on nested fields. For example, you could filter on instances
# that have set the scheduling.automaticRestart field to true. Use filtering on
# nested fields to take advantage of labels to organize and search for results
# based on label values.
# To filter on multiple expressions, provide each separate expression within
# parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-
# central1-f). Multiple expressions are treated as AND expressions, meaning that
# resources must match all expressions to pass the filters.
# @param [Fixnum] max_results
# The maximum number of results per page that should be returned. If the number
# of available results is larger than maxResults, Compute Engine returns a
# nextPageToken that can be used to get the next page of results in subsequent
# list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name.
# You can also sort results in descending order based on the creation timestamp
# using orderBy="creationTimestamp desc". This sorts results based on the
# creationTimestamp field in reverse chronological order (newest result first).
# Use this to sort resources like operations so that the newest operation is
# returned first.
# Currently, only sorting by name or creationTimestamp desc is supported.
# @param [String] page_token
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
# a previous list request to get the next 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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::SslPoliciesListAvailableFeaturesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::SslPoliciesListAvailableFeaturesResponse]
#
# @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_ssl_policy_available_features(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/global/sslPolicies/listAvailableFeatures', options)
command.response_representation = Google::Apis::ComputeAlpha::SslPoliciesListAvailableFeaturesResponse::Representation
command.response_class = Google::Apis::ComputeAlpha::SslPoliciesListAvailableFeaturesResponse
command.params['project'] = project unless project.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['orderBy'] = order_by unless order_by.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?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Patches the specified SSL policy with the data included in the request.
# @param [String] project
# Project ID for this request.
# @param [String] ssl_policy
# Name of the SSL policy to update. The name must be 1-63 characters long, and
# comply with RFC1035.
# @param [Google::Apis::ComputeAlpha::SslPolicy] ssl_policy_object
# @param [String] request_id
# An optional request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments.
# The request ID must be a valid UUID with the exception that zero UUID is not
# supported (00000000-0000-0000-0000-000000000000).
# @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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::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 patch_ssl_policy(project, ssl_policy, ssl_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, '{project}/global/sslPolicies/{sslPolicy}', options)
command.request_representation = Google::Apis::ComputeAlpha::SslPolicy::Representation
command.request_object = ssl_policy_object
command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation
command.response_class = Google::Apis::ComputeAlpha::Operation
command.params['project'] = project unless project.nil?
command.params['sslPolicy'] = ssl_policy unless ssl_policy.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Returns permissions that a caller has on the specified resource.
# @param [String] project
# Project ID for this request.
# @param [String] resource
# Name of the resource for this request.
# @param [Google::Apis::ComputeAlpha::TestPermissionsRequest] test_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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::TestPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::TestPermissionsResponse]
#
# @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_ssl_policy_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/global/sslPolicies/{resource}/testIamPermissions', options)
command.request_representation = Google::Apis::ComputeAlpha::TestPermissionsRequest::Representation
command.request_object = test_permissions_request_object
command.response_representation = Google::Apis::ComputeAlpha::TestPermissionsResponse::Representation
command.response_class = Google::Apis::ComputeAlpha::TestPermissionsResponse
command.params['project'] = project unless project.nil?
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves an aggregated list of subnetworks.
# @param [String] project
# Project ID for this request.
@ -19944,6 +20442,82 @@ module Google
execute_or_queue_command(command, &block)
end
# Retrieves an aggregated list of usable subnetworks.
# @param [String] project
# Project ID for this request.
# @param [String] filter
# Sets a filter `expression` for filtering listed resources. Your `expression`
# must be in the format: field_name comparison_string literal_string.
# The field_name is the name of the field you want to compare. Only atomic field
# types are supported (string, number, boolean). The comparison_string must be
# either eq (equals) or ne (not equals). The literal_string is the string value
# to filter to. The literal value must be valid for the type of field you are
# filtering by (string, number, boolean). For string fields, the literal value
# is interpreted as a regular expression using RE2 syntax. The literal value
# must match the entire field.
# For example, to filter for instances that do not have a name of example-
# instance, you would use name ne example-instance.
# You can filter on nested fields. For example, you could filter on instances
# that have set the scheduling.automaticRestart field to true. Use filtering on
# nested fields to take advantage of labels to organize and search for results
# based on label values.
# To filter on multiple expressions, provide each separate expression within
# parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-
# central1-f). Multiple expressions are treated as AND expressions, meaning that
# resources must match all expressions to pass the filters.
# @param [Fixnum] max_results
# The maximum number of results per page that should be returned. If the number
# of available results is larger than maxResults, Compute Engine returns a
# nextPageToken that can be used to get the next page of results in subsequent
# list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name.
# You can also sort results in descending order based on the creation timestamp
# using orderBy="creationTimestamp desc". This sorts results based on the
# creationTimestamp field in reverse chronological order (newest result first).
# Use this to sort resources like operations so that the newest operation is
# returned first.
# Currently, only sorting by name or creationTimestamp desc is supported.
# @param [String] page_token
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
# a previous list request to get the next 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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::UsableSubnetworksAggregatedList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::UsableSubnetworksAggregatedList]
#
# @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_subnetwork_usable(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/aggregated/subnetworks/listUsable', options)
command.response_representation = Google::Apis::ComputeAlpha::UsableSubnetworksAggregatedList::Representation
command.response_class = Google::Apis::ComputeAlpha::UsableSubnetworksAggregatedList
command.params['project'] = project unless project.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['orderBy'] = order_by unless order_by.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?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Patches the specified subnetwork with the data included in the request. Only
# the following fields within the subnetwork resource can be specified in the
# request: secondary_ip_range and allow_subnet_cidr_routes_overlap. It is also
@ -20785,6 +21359,63 @@ module Google
execute_or_queue_command(command, &block)
end
# Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-
# side support for SSL features. This affects connections between clients and
# the HTTPS proxy load balancer. They do not affect the connection between the
# load balancer and the backends.
# @param [String] project
# Project ID for this request.
# @param [String] target_https_proxy
# Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name
# must be 1-63 characters long, and comply with RFC1035.
# @param [Google::Apis::ComputeAlpha::SslPolicyReference] ssl_policy_reference_object
# @param [String] request_id
# An optional request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments.
# The request ID must be a valid UUID with the exception that zero UUID is not
# supported (00000000-0000-0000-0000-000000000000).
# @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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::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 set_target_https_proxy_ssl_policy(project, target_https_proxy, ssl_policy_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy', options)
command.request_representation = Google::Apis::ComputeAlpha::SslPolicyReference::Representation
command.request_object = ssl_policy_reference_object
command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation
command.response_class = Google::Apis::ComputeAlpha::Operation
command.params['project'] = project unless project.nil?
command.params['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Changes the URL map for TargetHttpsProxy.
# @param [String] project
# Project ID for this request.
@ -22280,6 +22911,63 @@ module Google
execute_or_queue_command(command, &block)
end
# Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-
# side support for SSL features. This affects connections between clients and
# the SSL proxy load balancer. They do not affect the connection between the
# load balancer and the backends.
# @param [String] project
# Project ID for this request.
# @param [String] target_ssl_proxy
# Name of the TargetSslProxy resource whose SSL policy is to be set. The name
# must be 1-63 characters long, and comply with RFC1035.
# @param [Google::Apis::ComputeAlpha::SslPolicyReference] ssl_policy_reference_object
# @param [String] request_id
# An optional request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments.
# The request ID must be a valid UUID with the exception that zero UUID is not
# supported (00000000-0000-0000-0000-000000000000).
# @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.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeAlpha::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeAlpha::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 set_target_ssl_proxy_ssl_policy(project, target_ssl_proxy, ssl_policy_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy', options)
command.request_representation = Google::Apis::ComputeAlpha::SslPolicyReference::Representation
command.request_object = ssl_policy_reference_object
command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation
command.response_class = Google::Apis::ComputeAlpha::Operation
command.params['project'] = project unless project.nil?
command.params['targetSslProxy'] = target_ssl_proxy unless target_ssl_proxy.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Returns permissions that a caller has on the specified resource.
# @param [String] project
# Project ID for this request.

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/compute/docs/reference/latest/
module ComputeBeta
VERSION = 'Beta'
REVISION = '20170821'
REVISION = '20170905'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -14853,18 +14853,18 @@ module Google
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeBeta::SecurityPoliciesList] parsed result object
# @yieldparam result [Google::Apis::ComputeBeta::SecurityPolicyList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeBeta::SecurityPoliciesList]
# @return [Google::Apis::ComputeBeta::SecurityPolicyList]
#
# @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_security_policies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/global/securityPolicies', options)
command.response_representation = Google::Apis::ComputeBeta::SecurityPoliciesList::Representation
command.response_class = Google::Apis::ComputeBeta::SecurityPoliciesList
command.response_representation = Google::Apis::ComputeBeta::SecurityPolicyList::Representation
command.response_class = Google::Apis::ComputeBeta::SecurityPolicyList
command.params['project'] = project unless project.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/compute/docs/reference/latest/
module ComputeV1
VERSION = 'V1'
REVISION = '20170821'
REVISION = '20170905'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -694,10 +694,9 @@ module Google
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :disk_encryption_key
# Assigns a zero-based index to this disk, where 0 is reserved for the boot disk.
# For example, if you have many disks attached to an instance, each disk would
# have a unique index number. If not specified, the server will choose an
# appropriate value.
# [Output Only] A zero-based index to this disk, where 0 is reserved for the
# boot disk. If you have many disks attached to an instance, each disk would
# have a unique index number.
# Corresponds to the JSON property `index`
# @return [Fixnum]
attr_accessor :index
@ -8146,7 +8145,7 @@ module Google
# @return [String]
attr_accessor :next_page_token
# Serive resources (a.k.a service projects) attached to this project as their
# Service resources (a.k.a service projects) attached to this project as their
# shared VPC host.
# Corresponds to the JSON property `resources`
# @return [Array<Google::Apis::ComputeV1::XpnResourceId>]

View File

@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/dlp/docs/
module DlpV2beta1
VERSION = 'V2beta1'
REVISION = '20170830'
REVISION = '20170913'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -49,6 +49,37 @@ module Google
@batch_path = 'batch'
end
# De-identifies potentially sensitive info from a list of strings.
# This method has limits on input size and output size.
# @param [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentRequest] google_privacy_dlp_v2beta1_deidentify_content_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::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentResponse]
#
# @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 deidentify_content(google_privacy_dlp_v2beta1_deidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/content:deidentify', options)
command.request_representation = Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentRequest::Representation
command.request_object = google_privacy_dlp_v2beta1_deidentify_content_request_object
command.response_representation = Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentResponse::Representation
command.response_class = Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Finds potentially sensitive info in a list of strings.
# This method has limits on input size, processing time, and output size.
# @param [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1InspectContentRequest] google_privacy_dlp_v2beta1_inspect_content_request_object
@ -111,6 +142,37 @@ module Google
execute_or_queue_command(command, &block)
end
# Schedules a job to compute risk analysis metrics over content in a Google
# Cloud Platform repository.
# @param [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest] google_privacy_dlp_v2beta1_analyze_data_source_risk_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::DlpV2beta1::GoogleLongrunningOperation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DlpV2beta1::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 analyze_data_source(google_privacy_dlp_v2beta1_analyze_data_source_risk_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/dataSource:analyze', options)
command.request_representation = Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest::Representation
command.request_object = google_privacy_dlp_v2beta1_analyze_data_source_risk_request_object
command.response_representation = Google::Apis::DlpV2beta1::GoogleLongrunningOperation::Representation
command.response_class = Google::Apis::DlpV2beta1::GoogleLongrunningOperation
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Cancels an operation. Use the get method to check whether the cancellation
# succeeded or whether the operation completed despite cancellation.
# @param [String] name

File diff suppressed because it is too large Load Diff

View File

@ -1,688 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module TestingV1
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidDevice
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidDeviceCatalog
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidDeviceList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidInstrumentationTest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidMatrix
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidModel
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidRoboTest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidRuntimeConfiguration
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidTestLoop
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AndroidVersion
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CancelTestMatrixResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ClientInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ClientInfoDetail
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Date
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DeviceFile
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Distribution
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Environment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EnvironmentMatrix
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EnvironmentVariable
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FileReference
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleAuto
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudStorage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Locale
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class NetworkConfiguration
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class NetworkConfigurationCatalog
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ObbFile
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Orientation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ResultStorage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RoboDirective
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestEnvironmentCatalog
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestExecution
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestMatrix
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestSetup
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestSpecification
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ToolResultsExecution
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ToolResultsHistory
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ToolResultsStep
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TrafficRule
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Account
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :google_auto, as: 'googleAuto', class: Google::Apis::TestingV1::GoogleAuto, decorator: Google::Apis::TestingV1::GoogleAuto::Representation
end
end
class AndroidDevice
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :android_model_id, as: 'androidModelId'
property :android_version_id, as: 'androidVersionId'
property :locale, as: 'locale'
property :orientation, as: 'orientation'
end
end
class AndroidDeviceCatalog
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :models, as: 'models', class: Google::Apis::TestingV1::AndroidModel, decorator: Google::Apis::TestingV1::AndroidModel::Representation
property :runtime_configuration, as: 'runtimeConfiguration', class: Google::Apis::TestingV1::AndroidRuntimeConfiguration, decorator: Google::Apis::TestingV1::AndroidRuntimeConfiguration::Representation
collection :versions, as: 'versions', class: Google::Apis::TestingV1::AndroidVersion, decorator: Google::Apis::TestingV1::AndroidVersion::Representation
end
end
class AndroidDeviceList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :android_devices, as: 'androidDevices', class: Google::Apis::TestingV1::AndroidDevice, decorator: Google::Apis::TestingV1::AndroidDevice::Representation
end
end
class AndroidInstrumentationTest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_apk, as: 'appApk', class: Google::Apis::TestingV1::FileReference, decorator: Google::Apis::TestingV1::FileReference::Representation
property :app_package_id, as: 'appPackageId'
property :orchestrator_option, as: 'orchestratorOption'
property :test_apk, as: 'testApk', class: Google::Apis::TestingV1::FileReference, decorator: Google::Apis::TestingV1::FileReference::Representation
property :test_package_id, as: 'testPackageId'
property :test_runner_class, as: 'testRunnerClass'
collection :test_targets, as: 'testTargets'
end
end
class AndroidMatrix
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :android_model_ids, as: 'androidModelIds'
collection :android_version_ids, as: 'androidVersionIds'
collection :locales, as: 'locales'
collection :orientations, as: 'orientations'
end
end
class AndroidModel
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :brand, as: 'brand'
property :codename, as: 'codename'
property :form, as: 'form'
property :id, as: 'id'
property :manufacturer, as: 'manufacturer'
property :name, as: 'name'
property :screen_density, as: 'screenDensity'
property :screen_x, as: 'screenX'
property :screen_y, as: 'screenY'
collection :supported_abis, as: 'supportedAbis'
collection :supported_version_ids, as: 'supportedVersionIds'
collection :tags, as: 'tags'
end
end
class AndroidRoboTest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_apk, as: 'appApk', class: Google::Apis::TestingV1::FileReference, decorator: Google::Apis::TestingV1::FileReference::Representation
property :app_initial_activity, as: 'appInitialActivity'
property :app_package_id, as: 'appPackageId'
property :max_depth, as: 'maxDepth'
property :max_steps, as: 'maxSteps'
collection :robo_directives, as: 'roboDirectives', class: Google::Apis::TestingV1::RoboDirective, decorator: Google::Apis::TestingV1::RoboDirective::Representation
end
end
class AndroidRuntimeConfiguration
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :locales, as: 'locales', class: Google::Apis::TestingV1::Locale, decorator: Google::Apis::TestingV1::Locale::Representation
collection :orientations, as: 'orientations', class: Google::Apis::TestingV1::Orientation, decorator: Google::Apis::TestingV1::Orientation::Representation
end
end
class AndroidTestLoop
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_apk, as: 'appApk', class: Google::Apis::TestingV1::FileReference, decorator: Google::Apis::TestingV1::FileReference::Representation
property :app_package_id, as: 'appPackageId'
collection :scenario_labels, as: 'scenarioLabels'
collection :scenarios, as: 'scenarios'
end
end
class AndroidVersion
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :api_level, as: 'apiLevel'
property :code_name, as: 'codeName'
property :distribution, as: 'distribution', class: Google::Apis::TestingV1::Distribution, decorator: Google::Apis::TestingV1::Distribution::Representation
property :id, as: 'id'
property :release_date, as: 'releaseDate', class: Google::Apis::TestingV1::Date, decorator: Google::Apis::TestingV1::Date::Representation
collection :tags, as: 'tags'
property :version_string, as: 'versionString'
end
end
class CancelTestMatrixResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :test_state, as: 'testState'
end
end
class ClientInfo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :client_info_details, as: 'clientInfoDetails', class: Google::Apis::TestingV1::ClientInfoDetail, decorator: Google::Apis::TestingV1::ClientInfoDetail::Representation
property :name, as: 'name'
end
end
class ClientInfoDetail
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
class Date
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :day, as: 'day'
property :month, as: 'month'
property :year, as: 'year'
end
end
class DeviceFile
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :obb_file, as: 'obbFile', class: Google::Apis::TestingV1::ObbFile, decorator: Google::Apis::TestingV1::ObbFile::Representation
end
end
class Distribution
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :market_share, as: 'marketShare'
property :measurement_time, as: 'measurementTime'
end
end
class Environment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :android_device, as: 'androidDevice', class: Google::Apis::TestingV1::AndroidDevice, decorator: Google::Apis::TestingV1::AndroidDevice::Representation
end
end
class EnvironmentMatrix
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :android_device_list, as: 'androidDeviceList', class: Google::Apis::TestingV1::AndroidDeviceList, decorator: Google::Apis::TestingV1::AndroidDeviceList::Representation
property :android_matrix, as: 'androidMatrix', class: Google::Apis::TestingV1::AndroidMatrix, decorator: Google::Apis::TestingV1::AndroidMatrix::Representation
end
end
class EnvironmentVariable
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
class FileReference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :gcs_path, as: 'gcsPath'
end
end
class GoogleAuto
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class GoogleCloudStorage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :gcs_path, as: 'gcsPath'
end
end
class Locale
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :name, as: 'name'
property :region, as: 'region'
collection :tags, as: 'tags'
end
end
class NetworkConfiguration
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :down_rule, as: 'downRule', class: Google::Apis::TestingV1::TrafficRule, decorator: Google::Apis::TestingV1::TrafficRule::Representation
property :id, as: 'id'
property :up_rule, as: 'upRule', class: Google::Apis::TestingV1::TrafficRule, decorator: Google::Apis::TestingV1::TrafficRule::Representation
end
end
class NetworkConfigurationCatalog
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :configurations, as: 'configurations', class: Google::Apis::TestingV1::NetworkConfiguration, decorator: Google::Apis::TestingV1::NetworkConfiguration::Representation
end
end
class ObbFile
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :obb, as: 'obb', class: Google::Apis::TestingV1::FileReference, decorator: Google::Apis::TestingV1::FileReference::Representation
property :obb_file_name, as: 'obbFileName'
end
end
class Orientation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :name, as: 'name'
collection :tags, as: 'tags'
end
end
class ResultStorage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :google_cloud_storage, as: 'googleCloudStorage', class: Google::Apis::TestingV1::GoogleCloudStorage, decorator: Google::Apis::TestingV1::GoogleCloudStorage::Representation
property :tool_results_execution, as: 'toolResultsExecution', class: Google::Apis::TestingV1::ToolResultsExecution, decorator: Google::Apis::TestingV1::ToolResultsExecution::Representation
property :tool_results_history, as: 'toolResultsHistory', class: Google::Apis::TestingV1::ToolResultsHistory, decorator: Google::Apis::TestingV1::ToolResultsHistory::Representation
end
end
class RoboDirective
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :action_type, as: 'actionType'
property :input_text, as: 'inputText'
property :resource_name, as: 'resourceName'
end
end
class TestDetails
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :error_message, as: 'errorMessage'
collection :progress_messages, as: 'progressMessages'
end
end
class TestEnvironmentCatalog
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :android_device_catalog, as: 'androidDeviceCatalog', class: Google::Apis::TestingV1::AndroidDeviceCatalog, decorator: Google::Apis::TestingV1::AndroidDeviceCatalog::Representation
property :network_configuration_catalog, as: 'networkConfigurationCatalog', class: Google::Apis::TestingV1::NetworkConfigurationCatalog, decorator: Google::Apis::TestingV1::NetworkConfigurationCatalog::Representation
end
end
class TestExecution
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :environment, as: 'environment', class: Google::Apis::TestingV1::Environment, decorator: Google::Apis::TestingV1::Environment::Representation
property :id, as: 'id'
property :matrix_id, as: 'matrixId'
property :project_id, as: 'projectId'
property :state, as: 'state'
property :test_details, as: 'testDetails', class: Google::Apis::TestingV1::TestDetails, decorator: Google::Apis::TestingV1::TestDetails::Representation
property :test_specification, as: 'testSpecification', class: Google::Apis::TestingV1::TestSpecification, decorator: Google::Apis::TestingV1::TestSpecification::Representation
property :timestamp, as: 'timestamp'
property :tool_results_step, as: 'toolResultsStep', class: Google::Apis::TestingV1::ToolResultsStep, decorator: Google::Apis::TestingV1::ToolResultsStep::Representation
end
end
class TestMatrix
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :client_info, as: 'clientInfo', class: Google::Apis::TestingV1::ClientInfo, decorator: Google::Apis::TestingV1::ClientInfo::Representation
property :environment_matrix, as: 'environmentMatrix', class: Google::Apis::TestingV1::EnvironmentMatrix, decorator: Google::Apis::TestingV1::EnvironmentMatrix::Representation
property :invalid_matrix_details, as: 'invalidMatrixDetails'
property :project_id, as: 'projectId'
property :result_storage, as: 'resultStorage', class: Google::Apis::TestingV1::ResultStorage, decorator: Google::Apis::TestingV1::ResultStorage::Representation
property :state, as: 'state'
collection :test_executions, as: 'testExecutions', class: Google::Apis::TestingV1::TestExecution, decorator: Google::Apis::TestingV1::TestExecution::Representation
property :test_matrix_id, as: 'testMatrixId'
property :test_specification, as: 'testSpecification', class: Google::Apis::TestingV1::TestSpecification, decorator: Google::Apis::TestingV1::TestSpecification::Representation
property :timestamp, as: 'timestamp'
end
end
class TestSetup
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :account, as: 'account', class: Google::Apis::TestingV1::Account, decorator: Google::Apis::TestingV1::Account::Representation
collection :directories_to_pull, as: 'directoriesToPull'
collection :environment_variables, as: 'environmentVariables', class: Google::Apis::TestingV1::EnvironmentVariable, decorator: Google::Apis::TestingV1::EnvironmentVariable::Representation
collection :files_to_push, as: 'filesToPush', class: Google::Apis::TestingV1::DeviceFile, decorator: Google::Apis::TestingV1::DeviceFile::Representation
property :network_profile, as: 'networkProfile'
end
end
class TestSpecification
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :android_instrumentation_test, as: 'androidInstrumentationTest', class: Google::Apis::TestingV1::AndroidInstrumentationTest, decorator: Google::Apis::TestingV1::AndroidInstrumentationTest::Representation
property :android_robo_test, as: 'androidRoboTest', class: Google::Apis::TestingV1::AndroidRoboTest, decorator: Google::Apis::TestingV1::AndroidRoboTest::Representation
property :android_test_loop, as: 'androidTestLoop', class: Google::Apis::TestingV1::AndroidTestLoop, decorator: Google::Apis::TestingV1::AndroidTestLoop::Representation
property :auto_google_login, as: 'autoGoogleLogin'
property :disable_performance_metrics, as: 'disablePerformanceMetrics'
property :disable_video_recording, as: 'disableVideoRecording'
property :test_setup, as: 'testSetup', class: Google::Apis::TestingV1::TestSetup, decorator: Google::Apis::TestingV1::TestSetup::Representation
property :test_timeout, as: 'testTimeout'
end
end
class ToolResultsExecution
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :execution_id, as: 'executionId'
property :history_id, as: 'historyId'
property :project_id, as: 'projectId'
end
end
class ToolResultsHistory
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :history_id, as: 'historyId'
property :project_id, as: 'projectId'
end
end
class ToolResultsStep
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :execution_id, as: 'executionId'
property :history_id, as: 'historyId'
property :project_id, as: 'projectId'
property :step_id, as: 'stepId'
end
end
class TrafficRule
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bandwidth, as: 'bandwidth'
property :burst, as: 'burst'
property :delay, as: 'delay'
property :packet_duplication_ratio, as: 'packetDuplicationRatio'
property :packet_loss_ratio, as: 'packetLossRatio'
end
end
end
end
end

View File

@ -1,221 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module TestingV1
# Google Cloud Testing API
#
# Allows developers to run automated tests for their mobile applications on
# Google infrastructure.
#
# @example
# require 'google/apis/testing_v1'
#
# Testing = Google::Apis::TestingV1 # Alias the module
# service = Testing::TestingService.new
#
# @see https://developers.google.com/cloud-test-lab/
class TestingService < 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://testing.googleapis.com/', '')
@batch_path = 'batch'
end
# Cancels unfinished test executions in a test matrix.
# This call returns immediately and cancellation proceeds asychronously.
# If the matrix is already final, this operation will have no effect.
# May return any of the following canonical error codes:
# - PERMISSION_DENIED - if the user is not authorized to read project
# - INVALID_ARGUMENT - if the request is malformed
# - NOT_FOUND - if the Test Matrix does not exist
# @param [String] project_id
# Cloud project that owns the test.
# @param [String] test_matrix_id
# Test matrix that will be canceled.
# @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::TestingV1::CancelTestMatrixResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::TestingV1::CancelTestMatrixResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def cancel_project_test_matrix(project_id, test_matrix_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel', options)
command.response_representation = Google::Apis::TestingV1::CancelTestMatrixResponse::Representation
command.response_class = Google::Apis::TestingV1::CancelTestMatrixResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['testMatrixId'] = test_matrix_id unless test_matrix_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
# Request to run a matrix of tests according to the given specifications.
# Unsupported environments will be returned in the state UNSUPPORTED.
# Matrices are limited to at most 200 supported executions.
# May return any of the following canonical error codes:
# - PERMISSION_DENIED - if the user is not authorized to write to project
# - INVALID_ARGUMENT - if the request is malformed or if the matrix expands
# to more than 200 supported executions
# @param [String] project_id
# The GCE project under which this job will run.
# @param [Google::Apis::TestingV1::TestMatrix] test_matrix_object
# @param [String] request_id
# A string id used to detect duplicated requests.
# Ids are automatically scoped to a project, so
# users should ensure the ID is unique per-project.
# A UUID is recommended.
# Optional, but strongly recommended.
# @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::TestingV1::TestMatrix] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::TestingV1::TestMatrix]
#
# @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_test_matrix(project_id, test_matrix_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/testMatrices', options)
command.request_representation = Google::Apis::TestingV1::TestMatrix::Representation
command.request_object = test_matrix_object
command.response_representation = Google::Apis::TestingV1::TestMatrix::Representation
command.response_class = Google::Apis::TestingV1::TestMatrix
command.params['projectId'] = project_id unless project_id.nil?
command.query['requestId'] = request_id unless request_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
# Check the status of a test matrix.
# May return any of the following canonical error codes:
# - PERMISSION_DENIED - if the user is not authorized to read project
# - INVALID_ARGUMENT - if the request is malformed
# - NOT_FOUND - if the Test Matrix does not exist
# @param [String] project_id
# Cloud project that owns the test matrix.
# @param [String] test_matrix_id
# Unique test matrix id which was assigned by the service.
# @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::TestingV1::TestMatrix] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::TestingV1::TestMatrix]
#
# @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_test_matrix(project_id, test_matrix_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/testMatrices/{testMatrixId}', options)
command.response_representation = Google::Apis::TestingV1::TestMatrix::Representation
command.response_class = Google::Apis::TestingV1::TestMatrix
command.params['projectId'] = project_id unless project_id.nil?
command.params['testMatrixId'] = test_matrix_id unless test_matrix_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
# Get the catalog of supported test environments.
# May return any of the following canonical error codes:
# - INVALID_ARGUMENT - if the request is malformed
# - NOT_FOUND - if the environment type does not exist
# - INTERNAL - if an internal error occurred
# @param [String] environment_type
# The type of environment that should be listed.
# Required
# @param [String] project_id
# For authorization, the cloud project requesting the TestEnvironmentCatalog.
# Optional
# @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::TestingV1::TestEnvironmentCatalog] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::TestingV1::TestEnvironmentCatalog]
#
# @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_test_environment_catalog(environment_type, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/testEnvironmentCatalog/{environmentType}', options)
command.response_representation = Google::Apis::TestingV1::TestEnvironmentCatalog::Representation
command.response_class = Google::Apis::TestingV1::TestEnvironmentCatalog
command.params['environmentType'] = environment_type unless environment_type.nil?
command.query['projectId'] = project_id unless project_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
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

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/youtube/v3
module YoutubeV3
VERSION = 'V3'
REVISION = '20170130'
REVISION = '20170903'
# Manage your YouTube account
AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube'

View File

@ -2289,7 +2289,7 @@ module Google
end
# Ratings schemes. The country-specific ratings are mostly for movies and shows.
# NEXT_ID: 69
# NEXT_ID: 71
class ContentRating
include Google::Apis::Core::Hashable
@ -2547,6 +2547,11 @@ module Google
# @return [String]
attr_accessor :meku_rating
# The rating system for MENA countries, a clone of MPAA. It is needed to
# Corresponds to the JSON property `menaMpaaRating`
# @return [String]
attr_accessor :mena_mpaa_rating
# The video's rating from the Ministero dei Beni e delle Attività Culturali e
# del Turismo (Italy).
# Corresponds to the JSON property `mibacRating`
@ -2568,6 +2573,12 @@ module Google
# @return [String]
attr_accessor :mpaa_rating
# The rating system for trailer, DVD, and Ad in the US. See http://movielabs.com/
# md/ratings/v2.3/html/US_MPAAT_Ratings.html.
# Corresponds to the JSON property `mpaatRating`
# @return [String]
attr_accessor :mpaat_rating
# The video's rating from the Movie and Television Review and Classification
# Board (Philippines).
# Corresponds to the JSON property `mtrcbRating`
@ -2716,10 +2727,12 @@ module Google
@mda_rating = args[:mda_rating] if args.key?(:mda_rating)
@medietilsynet_rating = args[:medietilsynet_rating] if args.key?(:medietilsynet_rating)
@meku_rating = args[:meku_rating] if args.key?(:meku_rating)
@mena_mpaa_rating = args[:mena_mpaa_rating] if args.key?(:mena_mpaa_rating)
@mibac_rating = args[:mibac_rating] if args.key?(:mibac_rating)
@moc_rating = args[:moc_rating] if args.key?(:moc_rating)
@moctw_rating = args[:moctw_rating] if args.key?(:moctw_rating)
@mpaa_rating = args[:mpaa_rating] if args.key?(:mpaa_rating)
@mpaat_rating = args[:mpaat_rating] if args.key?(:mpaat_rating)
@mtrcb_rating = args[:mtrcb_rating] if args.key?(:mtrcb_rating)
@nbc_rating = args[:nbc_rating] if args.key?(:nbc_rating)
@nbcpl_rating = args[:nbcpl_rating] if args.key?(:nbcpl_rating)
@ -3698,11 +3711,6 @@ module Google
# @return [Google::Apis::YoutubeV3::LiveBroadcastStatus]
attr_accessor :status
#
# Corresponds to the JSON property `topicDetails`
# @return [Google::Apis::YoutubeV3::LiveBroadcastTopicDetails]
attr_accessor :topic_details
def initialize(**args)
update!(**args)
end
@ -3716,7 +3724,6 @@ module Google
@snippet = args[:snippet] if args.key?(:snippet)
@statistics = args[:statistics] if args.key?(:statistics)
@status = args[:status] if args.key?(:status)
@topic_details = args[:topic_details] if args.key?(:topic_details)
end
end
@ -3783,6 +3790,12 @@ module Google
attr_accessor :enable_low_latency
alias_method :enable_low_latency?, :enable_low_latency
#
# Corresponds to the JSON property `mesh`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :mesh
# Settings and Info of the monitor stream
# Corresponds to the JSON property `monitorStream`
# @return [Google::Apis::YoutubeV3::MonitorStreamInfo]
@ -3829,6 +3842,7 @@ module Google
@enable_dvr = args[:enable_dvr] if args.key?(:enable_dvr)
@enable_embed = args[:enable_embed] if args.key?(:enable_embed)
@enable_low_latency = args[:enable_low_latency] if args.key?(:enable_low_latency)
@mesh = args[:mesh] if args.key?(:mesh)
@monitor_stream = args[:monitor_stream] if args.key?(:monitor_stream)
@projection = args[:projection] if args.key?(:projection)
@record_from_start = args[:record_from_start] if args.key?(:record_from_start)
@ -4077,83 +4091,6 @@ module Google
end
end
#
class LiveBroadcastTopic
include Google::Apis::Core::Hashable
# Information about the topic matched.
# Corresponds to the JSON property `snippet`
# @return [Google::Apis::YoutubeV3::LiveBroadcastTopicSnippet]
attr_accessor :snippet
# The type of the topic.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# If this flag is set it means that we have not been able to match the topic
# title and type provided to a known entity.
# Corresponds to the JSON property `unmatched`
# @return [Boolean]
attr_accessor :unmatched
alias_method :unmatched?, :unmatched
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@snippet = args[:snippet] if args.key?(:snippet)
@type = args[:type] if args.key?(:type)
@unmatched = args[:unmatched] if args.key?(:unmatched)
end
end
#
class LiveBroadcastTopicDetails
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `topics`
# @return [Array<Google::Apis::YoutubeV3::LiveBroadcastTopic>]
attr_accessor :topics
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@topics = args[:topics] if args.key?(:topics)
end
end
#
class LiveBroadcastTopicSnippet
include Google::Apis::Core::Hashable
# The name of the topic.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The date at which the topic was released. Filled for types: videoGame
# Corresponds to the JSON property `releaseDate`
# @return [String]
attr_accessor :release_date
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@release_date = args[:release_date] if args.key?(:release_date)
end
end
# A liveChatBan resource represents a ban for a YouTube live chat.
class LiveChatBan
include Google::Apis::Core::Hashable
@ -7507,7 +7444,7 @@ module Google
attr_accessor :caption
# Ratings schemes. The country-specific ratings are mostly for movies and shows.
# NEXT_ID: 69
# NEXT_ID: 71
# Corresponds to the JSON property `contentRating`
# @return [Google::Apis::YoutubeV3::ContentRating]
attr_accessor :content_rating

View File

@ -484,24 +484,6 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class LiveBroadcastTopic
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LiveBroadcastTopicDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LiveBroadcastTopicSnippet
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LiveChatBan
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1759,10 +1741,12 @@ module Google
property :mda_rating, as: 'mdaRating'
property :medietilsynet_rating, as: 'medietilsynetRating'
property :meku_rating, as: 'mekuRating'
property :mena_mpaa_rating, as: 'menaMpaaRating'
property :mibac_rating, as: 'mibacRating'
property :moc_rating, as: 'mocRating'
property :moctw_rating, as: 'moctwRating'
property :mpaa_rating, as: 'mpaaRating'
property :mpaat_rating, as: 'mpaatRating'
property :mtrcb_rating, as: 'mtrcbRating'
property :nbc_rating, as: 'nbcRating'
property :nbcpl_rating, as: 'nbcplRating'
@ -2041,8 +2025,6 @@ module Google
property :status, as: 'status', class: Google::Apis::YoutubeV3::LiveBroadcastStatus, decorator: Google::Apis::YoutubeV3::LiveBroadcastStatus::Representation
property :topic_details, as: 'topicDetails', class: Google::Apis::YoutubeV3::LiveBroadcastTopicDetails, decorator: Google::Apis::YoutubeV3::LiveBroadcastTopicDetails::Representation
end
end
@ -2058,6 +2040,7 @@ module Google
property :enable_dvr, as: 'enableDvr'
property :enable_embed, as: 'enableEmbed'
property :enable_low_latency, as: 'enableLowLatency'
property :mesh, :base64 => true, as: 'mesh'
property :monitor_stream, as: 'monitorStream', class: Google::Apis::YoutubeV3::MonitorStreamInfo, decorator: Google::Apis::YoutubeV3::MonitorStreamInfo::Representation
property :projection, as: 'projection'
@ -2125,32 +2108,6 @@ module Google
end
end
class LiveBroadcastTopic
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :snippet, as: 'snippet', class: Google::Apis::YoutubeV3::LiveBroadcastTopicSnippet, decorator: Google::Apis::YoutubeV3::LiveBroadcastTopicSnippet::Representation
property :type, as: 'type'
property :unmatched, as: 'unmatched'
end
end
class LiveBroadcastTopicDetails
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :topics, as: 'topics', class: Google::Apis::YoutubeV3::LiveBroadcastTopic, decorator: Google::Apis::YoutubeV3::LiveBroadcastTopic::Representation
end
end
class LiveBroadcastTopicSnippet
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :release_date, as: 'releaseDate'
end
end
class LiveChatBan
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -523,6 +523,15 @@ module Google
# Set the brandingSettings.image.bannerExternalUrl property's value to the URL
# obtained in step 2.
# @param [Google::Apis::YoutubeV3::ChannelBannerResource] channel_banner_resource_object
# @param [String] channel_id
# The channelId parameter identifies the YouTube channel to which the banner is
# uploaded. The channelId parameter was introduced as a required parameter in
# May 2017. As this was a backward-incompatible change, channelBanners.insert
# requests that do not specify this parameter will not return an error until six
# months have passed from the time that the parameter was introduced. Please see
# the API Terms of Service for the official policy regarding backward
# incompatible changes and the API revision history for the exact date that the
# parameter was introduced.
# @param [String] on_behalf_of_content_owner
# Note: This parameter is intended exclusively for YouTube content partners.
# The onBehalfOfContentOwner parameter indicates that the request's
@ -558,7 +567,7 @@ module Google
# @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 insert_channel_banner(channel_banner_resource_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
def insert_channel_banner(channel_banner_resource_object = nil, channel_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
if upload_source.nil?
command = make_simple_command(:post, 'channelBanners/insert', options)
else
@ -570,6 +579,7 @@ module Google
command.request_object = channel_banner_resource_object
command.response_representation = Google::Apis::YoutubeV3::ChannelBannerResource::Representation
command.response_class = Google::Apis::YoutubeV3::ChannelBannerResource
command.query['channelId'] = channel_id unless channel_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?