Regen APIs and bump version (#540)

This commit is contained in:
Sai Cheemalapati 2017-02-13 15:28:52 -08:00 committed by GitHub
parent 4f143ae551
commit 4447d65a96
132 changed files with 103588 additions and 101034 deletions

View File

@ -1,3 +1,9 @@
# 0.10.0
* Regenerate APIs
* Some exceptions are more descriptive for specific errors
* `representable` dependency bumped to `~> 3.0`
* `retriable` dependency bumped to `>= 2.0, < 4.0`
# 0.9.28
* Fix file permissions issue

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/
module Adexchangebuyer2V2beta1
VERSION = 'V2beta1'
REVISION = '20170130'
REVISION = '20170210'
# Manage your Ad Exchange buyer account configuration
AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'

View File

@ -125,6 +125,11 @@ module Google
class ClientUser
include Google::Apis::Core::Hashable
# The status of the client user.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# The unique numerical ID of the client user
# that has accepted an invitation.
# The value of this field is ignored in an update operation.
@ -146,21 +151,16 @@ module Google
# @return [String]
attr_accessor :client_account_id
# The status of the client user.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@status = args[:status] if args.key?(:status)
@user_id = args[:user_id] if args.key?(:user_id)
@email = args[:email] if args.key?(:email)
@client_account_id = args[:client_account_id] if args.key?(:client_account_id)
@status = args[:status] if args.key?(:status)
end
end
@ -170,6 +170,12 @@ module Google
class ClientUserInvitation
include Google::Apis::Core::Hashable
# The unique numerical ID of the invitation that is sent to the user.
# The value of this field is ignored in create operations.
# Corresponds to the JSON property `invitationId`
# @return [String]
attr_accessor :invitation_id
# The email address to which the invitation is sent. Email
# addresses should be unique among all client users under each sponsor
# buyer.
@ -184,51 +190,15 @@ module Google
# @return [String]
attr_accessor :client_account_id
# The unique numerical ID of the invitation that is sent to the user.
# The value of this field is ignored in create operations.
# Corresponds to the JSON property `invitationId`
# @return [String]
attr_accessor :invitation_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@invitation_id = args[:invitation_id] if args.key?(:invitation_id)
@email = args[:email] if args.key?(:email)
@client_account_id = args[:client_account_id] if args.key?(:client_account_id)
@invitation_id = args[:invitation_id] if args.key?(:invitation_id)
end
end
#
class ListClientsResponse
include Google::Apis::Core::Hashable
# A token to retrieve the next page of results.
# Pass this value in the
# ListClientsRequest.pageToken
# field in the subsequent call to the
# accounts.clients.list method
# to retrieve the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The returned list of clients.
# Corresponds to the JSON property `clients`
# @return [Array<Google::Apis::Adexchangebuyer2V2beta1::Client>]
attr_accessor :clients
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@clients = args[:clients] if args.key?(:clients)
end
end
@ -267,6 +237,11 @@ module Google
class ListClientUserInvitationsResponse
include Google::Apis::Core::Hashable
# The returned list of client users.
# Corresponds to the JSON property `invitations`
# @return [Array<Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation>]
attr_accessor :invitations
# A token to retrieve the next page of results.
# Pass this value in the
# ListClientUserInvitationsRequest.pageToken
@ -278,10 +253,35 @@ module Google
# @return [String]
attr_accessor :next_page_token
# The returned list of client users.
# Corresponds to the JSON property `invitations`
# @return [Array<Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation>]
attr_accessor :invitations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@invitations = args[:invitations] if args.key?(:invitations)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
#
class ListClientsResponse
include Google::Apis::Core::Hashable
# The returned list of clients.
# Corresponds to the JSON property `clients`
# @return [Array<Google::Apis::Adexchangebuyer2V2beta1::Client>]
attr_accessor :clients
# A token to retrieve the next page of results.
# Pass this value in the
# ListClientsRequest.pageToken
# field in the subsequent call to the
# accounts.clients.list method
# to retrieve the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
@ -289,8 +289,8 @@ module Google
# Update properties of this object
def update!(**args)
@clients = args[:clients] if args.key?(:clients)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@invitations = args[:invitations] if args.key?(:invitations)
end
end
end

View File

@ -40,12 +40,6 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListClientsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListClientUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -58,6 +52,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListClientsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Client
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -75,28 +75,19 @@ module Google
class ClientUser
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :status, as: 'status'
property :user_id, as: 'userId'
property :email, as: 'email'
property :client_account_id, as: 'clientAccountId'
property :status, as: 'status'
end
end
class ClientUserInvitation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :invitation_id, as: 'invitationId'
property :email, as: 'email'
property :client_account_id, as: 'clientAccountId'
property :invitation_id, as: 'invitationId'
end
end
class ListClientsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :clients, as: 'clients', class: Google::Apis::Adexchangebuyer2V2beta1::Client, decorator: Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
end
end
@ -112,9 +103,18 @@ module Google
class ListClientUserInvitationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :invitations, as: 'invitations', class: Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation, decorator: Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class ListClientsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :clients, as: 'clients', class: Google::Apis::Adexchangebuyer2V2beta1::Client, decorator: Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
property :next_page_token, as: 'nextPageToken'
end
end
end

View File

@ -33,30 +33,30 @@ module Google
#
# @see https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/
class AdExchangeBuyerIIService < 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
# @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
def initialize
super('https://adexchangebuyer.googleapis.com/', '')
end
# Gets a client buyer with a given client account ID.
# Creates a new client buyer.
# @param [String] account_id
# Numerical account ID of the client's sponsor buyer. (required)
# @param [String] client_account_id
# Numerical account ID of the client buyer to retrieve. (required)
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Unique numerical account ID for the buyer of which the client buyer
# is a customer; the sponsor buyer to create a client for. (required)
# @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -69,14 +69,48 @@ 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 get_account_client(account_id, client_account_id, fields: nil, quota_user: nil, options: nil, &block)
def create_account_client(account_id, client_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
command.request_object = client_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client
command.params['accountId'] = account_id unless account_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets a client buyer with a given client account ID.
# @param [String] account_id
# Numerical account ID of the client's sponsor buyer. (required)
# @param [String] client_account_id
# Numerical account ID of the client buyer to retrieve. (required)
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::Client]
#
# @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_account_client(account_id, client_account_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client
command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -92,11 +126,11 @@ module Google
# @param [Fixnum] page_size
# Requested page size. The server may return fewer clients than requested.
# If unspecified, the server will pick an appropriate default.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -109,15 +143,15 @@ 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 list_account_clients(account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_account_clients(account_id, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse
command.params['accountId'] = account_id unless account_id.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -128,11 +162,11 @@ module Google
# @param [String] client_account_id
# Unique numerical account ID of the client to update. (required)
# @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -145,7 +179,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 update_account_client(account_id, client_account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def update_account_client(account_id, client_account_id, client_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
command.request_object = client_object
@ -153,42 +187,8 @@ module Google
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client
command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a new client buyer.
# @param [String] account_id
# Unique numerical account ID for the buyer of which the client buyer
# is a customer; the sponsor buyer to create a client for. (required)
# @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_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::Adexchangebuyer2V2beta1::Client] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::Client]
#
# @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_account_client(account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
command.request_object = client_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client
command.params['accountId'] = account_id unless account_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
@ -200,11 +200,11 @@ module Google
# to be retrieved is associated with. (required)
# @param [String] invitation_id
# Numerical identifier of the user invitation to retrieve. (required)
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -217,15 +217,15 @@ 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 get_account_client_invitation(account_id, client_account_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block)
def get_account_client_invitation(account_id, client_account_id, invitation_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation
command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
command.params['invitationId'] = invitation_id unless invitation_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -250,11 +250,11 @@ module Google
# @param [Fixnum] page_size
# Requested page size. Server may return fewer clients than requested.
# If unspecified, server will pick an appropriate default.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -267,7 +267,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 list_account_client_invitations(account_id, client_account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_account_client_invitations(account_id, client_account_id, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse
@ -275,8 +275,8 @@ module Google
command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -288,11 +288,11 @@ module Google
# Numerical account ID of the client buyer that the user
# should be associated with. (required)
# @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] client_user_invitation_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -305,7 +305,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 create_account_client_invitation(account_id, client_account_id, client_user_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def create_account_client_invitation(account_id, client_account_id, client_user_invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation
command.request_object = client_user_invitation_object
@ -313,49 +313,8 @@ module Google
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation
command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_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
# Updates an existing client user.
# Only the user status can be changed on update.
# @param [String] account_id
# Numerical account ID of the client's sponsor buyer. (required)
# @param [String] client_account_id
# Numerical account ID of the client buyer that the user to be retrieved
# is associated with. (required)
# @param [String] user_id
# Numerical identifier of the user to retrieve. (required)
# @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] client_user_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::Adexchangebuyer2V2beta1::ClientUser] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_account_client_user(account_id, client_account_id, user_id, client_user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
command.request_object = client_user_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser
command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
command.params['userId'] = user_id unless user_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
@ -379,11 +338,11 @@ module Google
# @param [Fixnum] page_size
# Requested page size. The server may return fewer clients than requested.
# If unspecified, the server will pick an appropriate default.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -396,7 +355,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 list_account_client_users(account_id, client_account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_account_client_users(account_id, client_account_id, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse
@ -404,8 +363,8 @@ module Google
command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -417,11 +376,11 @@ module Google
# that the user to be retrieved is associated with. (required)
# @param [String] user_id
# Numerical identifier of the user to retrieve. (required)
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -434,23 +393,64 @@ 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 get_account_client_user(account_id, client_account_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
def get_account_client_user(account_id, client_account_id, user_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser
command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Updates an existing client user.
# Only the user status can be changed on update.
# @param [String] account_id
# Numerical account ID of the client's sponsor buyer. (required)
# @param [String] client_account_id
# Numerical account ID of the client buyer that the user to be retrieved
# is associated with. (required)
# @param [String] user_id
# Numerical identifier of the user to retrieve. (required)
# @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] client_user_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_account_client_user(account_id, client_account_id, user_id, client_user_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
command.request_object = client_user_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser
command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.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?
command.query['key'] = key unless key.nil?
end
end
end

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/adsense/management/
module AdsenseV1_4
VERSION = 'V1_4'
REVISION = '20170201'
REVISION = '20170202'
# View and manage your AdSense data
AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense'

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/adsense/host/
module AdsensehostV4_1
VERSION = 'V4_1'
REVISION = '20170201'
REVISION = '20170202'
# View and manage your AdSense host data and associated accounts
AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost'

View File

@ -27,11 +27,11 @@ module Google
VERSION = 'V4'
REVISION = '20161129'
# View your Google Analytics data
AUTH_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/analytics.readonly'
# View and manage your Google Analytics data
AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics'
# View your Google Analytics data
AUTH_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/analytics.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -22,205 +22,37 @@ module Google
module Apis
module AnalyticsreportingV4
class PivotHeader
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Metric
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ColumnHeader
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DynamicSegment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricHeader
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Report
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentFilterClause
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DimensionFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentDimensionFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReportRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SimpleSegment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentMetricFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReportData
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetReportsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class OrderBy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Cohort
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class OrFiltersForSegment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SequenceSegment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PivotHeaderEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DimensionFilterClause
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentSequenceStep
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Pivot
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DateRangeValues
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricFilterClause
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Segment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DateRange
class OrderBy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReportRow
class SegmentDimensionFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CohortGroup
class SegmentSequenceStep
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetReportsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricHeaderEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Dimension
class Metric
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -232,30 +64,315 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Report
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PivotHeader
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DateRange
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReportRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Dimension
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DynamicSegment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SimpleSegment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ColumnHeader
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentFilterClause
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReportRow
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Cohort
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricFilterClause
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class OrFiltersForSegment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricHeader
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DimensionFilterClause
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetReportsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SequenceSegment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentMetricFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DateRangeValues
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CohortGroup
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetReportsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Pivot
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PivotHeaderEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SegmentDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricHeaderEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReportData
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DimensionFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :total_pivot_groups_count, as: 'totalPivotGroupsCount'
collection :pivot_header_entries, as: 'pivotHeaderEntries', class: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry::Representation
property :case_sensitive, as: 'caseSensitive'
property :dimension_name, as: 'dimensionName'
property :operator, as: 'operator'
property :not, as: 'not'
collection :expressions, as: 'expressions'
end
end
class Segment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dynamic_segment, as: 'dynamicSegment', class: Google::Apis::AnalyticsreportingV4::DynamicSegment, decorator: Google::Apis::AnalyticsreportingV4::DynamicSegment::Representation
property :segment_id, as: 'segmentId'
end
end
class OrderBy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :field_name, as: 'fieldName'
property :order_type, as: 'orderType'
property :sort_order, as: 'sortOrder'
end
end
class SegmentDimensionFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max_comparison_value, as: 'maxComparisonValue'
property :dimension_name, as: 'dimensionName'
property :operator, as: 'operator'
collection :expressions, as: 'expressions'
property :case_sensitive, as: 'caseSensitive'
property :min_comparison_value, as: 'minComparisonValue'
end
end
class SegmentSequenceStep
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation
property :match_type, as: 'matchType'
end
end
class Metric
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :alias, as: 'alias'
property :formatting_type, as: 'formattingType'
property :alias, as: 'alias'
property :expression, as: 'expression'
end
end
class ColumnHeader
class PivotValueRegion
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dimensions, as: 'dimensions'
property :metric_header, as: 'metricHeader', class: Google::Apis::AnalyticsreportingV4::MetricHeader, decorator: Google::Apis::AnalyticsreportingV4::MetricHeader::Representation
collection :values, as: 'values'
end
end
class Report
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :data, as: 'data', class: Google::Apis::AnalyticsreportingV4::ReportData, decorator: Google::Apis::AnalyticsreportingV4::ReportData::Representation
property :next_page_token, as: 'nextPageToken'
property :column_header, as: 'columnHeader', class: Google::Apis::AnalyticsreportingV4::ColumnHeader, decorator: Google::Apis::AnalyticsreportingV4::ColumnHeader::Representation
end
end
class PivotHeader
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :pivot_header_entries, as: 'pivotHeaderEntries', class: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry::Representation
property :total_pivot_groups_count, as: 'totalPivotGroupsCount'
end
end
class DateRange
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end_date, as: 'endDate'
property :start_date, as: 'startDate'
end
end
class MetricFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric_name, as: 'metricName'
property :comparison_value, as: 'comparisonValue'
property :operator, as: 'operator'
property :not, as: 'not'
end
end
class ReportRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation
collection :date_ranges, as: 'dateRanges', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation
property :page_token, as: 'pageToken'
collection :pivots, as: 'pivots', class: Google::Apis::AnalyticsreportingV4::Pivot, decorator: Google::Apis::AnalyticsreportingV4::Pivot::Representation
property :include_empty_rows, as: 'includeEmptyRows'
collection :metric_filter_clauses, as: 'metricFilterClauses', class: Google::Apis::AnalyticsreportingV4::MetricFilterClause, decorator: Google::Apis::AnalyticsreportingV4::MetricFilterClause::Representation
property :page_size, as: 'pageSize'
property :hide_totals, as: 'hideTotals'
property :hide_value_ranges, as: 'hideValueRanges'
property :filters_expression, as: 'filtersExpression'
property :cohort_group, as: 'cohortGroup', class: Google::Apis::AnalyticsreportingV4::CohortGroup, decorator: Google::Apis::AnalyticsreportingV4::CohortGroup::Representation
property :view_id, as: 'viewId'
collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::Metric, decorator: Google::Apis::AnalyticsreportingV4::Metric::Representation
collection :dimension_filter_clauses, as: 'dimensionFilterClauses', class: Google::Apis::AnalyticsreportingV4::DimensionFilterClause, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilterClause::Representation
collection :order_bys, as: 'orderBys', class: Google::Apis::AnalyticsreportingV4::OrderBy, decorator: Google::Apis::AnalyticsreportingV4::OrderBy::Representation
collection :segments, as: 'segments', class: Google::Apis::AnalyticsreportingV4::Segment, decorator: Google::Apis::AnalyticsreportingV4::Segment::Representation
property :sampling_level, as: 'samplingLevel'
end
end
class Dimension
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :histogram_buckets, as: 'histogramBuckets'
property :name, as: 'name'
end
end
@ -270,93 +387,6 @@ module Google
end
end
class MetricHeader
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :metric_header_entries, as: 'metricHeaderEntries', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation
collection :pivot_headers, as: 'pivotHeaders', class: Google::Apis::AnalyticsreportingV4::PivotHeader, decorator: Google::Apis::AnalyticsreportingV4::PivotHeader::Representation
end
end
class Report
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :column_header, as: 'columnHeader', class: Google::Apis::AnalyticsreportingV4::ColumnHeader, decorator: Google::Apis::AnalyticsreportingV4::ColumnHeader::Representation
property :data, as: 'data', class: Google::Apis::AnalyticsreportingV4::ReportData, decorator: Google::Apis::AnalyticsreportingV4::ReportData::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class SegmentFilterClause
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dimension_filter, as: 'dimensionFilter', class: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter::Representation
property :metric_filter, as: 'metricFilter', class: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter::Representation
property :not, as: 'not'
end
end
class DimensionFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dimension_name, as: 'dimensionName'
property :operator, as: 'operator'
property :case_sensitive, as: 'caseSensitive'
collection :expressions, as: 'expressions'
property :not, as: 'not'
end
end
class SegmentDimensionFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max_comparison_value, as: 'maxComparisonValue'
property :dimension_name, as: 'dimensionName'
property :case_sensitive, as: 'caseSensitive'
property :operator, as: 'operator'
collection :expressions, as: 'expressions'
property :min_comparison_value, as: 'minComparisonValue'
end
end
class ReportRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :cohort_group, as: 'cohortGroup', class: Google::Apis::AnalyticsreportingV4::CohortGroup, decorator: Google::Apis::AnalyticsreportingV4::CohortGroup::Representation
collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation
collection :metric_filter_clauses, as: 'metricFilterClauses', class: Google::Apis::AnalyticsreportingV4::MetricFilterClause, decorator: Google::Apis::AnalyticsreportingV4::MetricFilterClause::Representation
property :hide_totals, as: 'hideTotals'
property :include_empty_rows, as: 'includeEmptyRows'
collection :dimension_filter_clauses, as: 'dimensionFilterClauses', class: Google::Apis::AnalyticsreportingV4::DimensionFilterClause, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilterClause::Representation
collection :pivots, as: 'pivots', class: Google::Apis::AnalyticsreportingV4::Pivot, decorator: Google::Apis::AnalyticsreportingV4::Pivot::Representation
collection :date_ranges, as: 'dateRanges', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation
collection :segments, as: 'segments', class: Google::Apis::AnalyticsreportingV4::Segment, decorator: Google::Apis::AnalyticsreportingV4::Segment::Representation
property :sampling_level, as: 'samplingLevel'
collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::Metric, decorator: Google::Apis::AnalyticsreportingV4::Metric::Representation
property :page_size, as: 'pageSize'
collection :order_bys, as: 'orderBys', class: Google::Apis::AnalyticsreportingV4::OrderBy, decorator: Google::Apis::AnalyticsreportingV4::OrderBy::Representation
property :filters_expression, as: 'filtersExpression'
property :hide_value_ranges, as: 'hideValueRanges'
property :view_id, as: 'viewId'
property :page_token, as: 'pageToken'
end
end
class SimpleSegment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -365,58 +395,32 @@ module Google
end
end
class SegmentDefinition
class ColumnHeader
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :segment_filters, as: 'segmentFilters', class: Google::Apis::AnalyticsreportingV4::SegmentFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilter::Representation
property :metric_header, as: 'metricHeader', class: Google::Apis::AnalyticsreportingV4::MetricHeader, decorator: Google::Apis::AnalyticsreportingV4::MetricHeader::Representation
collection :dimensions, as: 'dimensions'
end
end
class SegmentFilterClause
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric_filter, as: 'metricFilter', class: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter::Representation
property :not, as: 'not'
property :dimension_filter, as: 'dimensionFilter', class: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter::Representation
end
end
class SegmentMetricFilter
class ReportRow
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric_name, as: 'metricName'
property :operator, as: 'operator'
property :comparison_value, as: 'comparisonValue'
property :scope, as: 'scope'
property :max_comparison_value, as: 'maxComparisonValue'
end
end
collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
class ReportData
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :row_count, as: 'rowCount'
collection :sampling_space_sizes, as: 'samplingSpaceSizes'
collection :maximums, as: 'maximums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
collection :samples_read_counts, as: 'samplesReadCounts'
collection :minimums, as: 'minimums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
collection :rows, as: 'rows', class: Google::Apis::AnalyticsreportingV4::ReportRow, decorator: Google::Apis::AnalyticsreportingV4::ReportRow::Representation
property :data_last_refreshed, as: 'dataLastRefreshed'
collection :totals, as: 'totals', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
property :is_data_golden, as: 'isDataGolden'
end
end
class GetReportsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :report_requests, as: 'reportRequests', class: Google::Apis::AnalyticsreportingV4::ReportRequest, decorator: Google::Apis::AnalyticsreportingV4::ReportRequest::Representation
end
end
class OrderBy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :sort_order, as: 'sortOrder'
property :order_type, as: 'orderType'
property :field_name, as: 'fieldName'
collection :dimensions, as: 'dimensions'
end
end
@ -424,9 +428,18 @@ module Google
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :name, as: 'name'
property :date_range, as: 'dateRange', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation
property :name, as: 'name'
end
end
class MetricFilterClause
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :operator, as: 'operator'
collection :filters, as: 'filters', class: Google::Apis::AnalyticsreportingV4::MetricFilter, decorator: Google::Apis::AnalyticsreportingV4::MetricFilter::Representation
end
end
@ -438,12 +451,100 @@ module Google
end
end
class MetricHeader
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :metric_header_entries, as: 'metricHeaderEntries', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation
collection :pivot_headers, as: 'pivotHeaders', class: Google::Apis::AnalyticsreportingV4::PivotHeader, decorator: Google::Apis::AnalyticsreportingV4::PivotHeader::Representation
end
end
class DimensionFilterClause
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :operator, as: 'operator'
collection :filters, as: 'filters', class: Google::Apis::AnalyticsreportingV4::DimensionFilter, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilter::Representation
end
end
class GetReportsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :reports, as: 'reports', class: Google::Apis::AnalyticsreportingV4::Report, decorator: Google::Apis::AnalyticsreportingV4::Report::Representation
end
end
class SequenceSegment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :first_step_should_match_first_hit, as: 'firstStepShouldMatchFirstHit'
collection :segment_sequence_steps, as: 'segmentSequenceSteps', class: Google::Apis::AnalyticsreportingV4::SegmentSequenceStep, decorator: Google::Apis::AnalyticsreportingV4::SegmentSequenceStep::Representation
property :first_step_should_match_first_hit, as: 'firstStepShouldMatchFirstHit'
end
end
class SegmentMetricFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max_comparison_value, as: 'maxComparisonValue'
property :comparison_value, as: 'comparisonValue'
property :operator, as: 'operator'
property :metric_name, as: 'metricName'
property :scope, as: 'scope'
end
end
class DateRangeValues
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :values, as: 'values'
collection :pivot_value_regions, as: 'pivotValueRegions', class: Google::Apis::AnalyticsreportingV4::PivotValueRegion, decorator: Google::Apis::AnalyticsreportingV4::PivotValueRegion::Representation
end
end
class CohortGroup
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :cohorts, as: 'cohorts', class: Google::Apis::AnalyticsreportingV4::Cohort, decorator: Google::Apis::AnalyticsreportingV4::Cohort::Representation
property :lifetime_value, as: 'lifetimeValue'
end
end
class GetReportsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :report_requests, as: 'reportRequests', class: Google::Apis::AnalyticsreportingV4::ReportRequest, decorator: Google::Apis::AnalyticsreportingV4::ReportRequest::Representation
end
end
class Pivot
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max_group_count, as: 'maxGroupCount'
property :start_group, as: 'startGroup'
collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::Metric, decorator: Google::Apis::AnalyticsreportingV4::Metric::Representation
collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation
collection :dimension_filter_clauses, as: 'dimensionFilterClauses', class: Google::Apis::AnalyticsreportingV4::DimensionFilterClause, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilterClause::Representation
end
end
class PivotHeaderEntry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dimension_names, as: 'dimensionNames'
property :metric, as: 'metric', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation
collection :dimension_values, as: 'dimensionValues'
end
end
@ -458,105 +559,10 @@ module Google
end
end
class PivotHeaderEntry
class SegmentDefinition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dimension_names, as: 'dimensionNames'
collection :dimension_values, as: 'dimensionValues'
property :metric, as: 'metric', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation
end
end
class DimensionFilterClause
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :operator, as: 'operator'
collection :filters, as: 'filters', class: Google::Apis::AnalyticsreportingV4::DimensionFilter, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilter::Representation
end
end
class SegmentSequenceStep
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :match_type, as: 'matchType'
collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation
end
end
class Pivot
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation
collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::Metric, decorator: Google::Apis::AnalyticsreportingV4::Metric::Representation
property :max_group_count, as: 'maxGroupCount'
collection :dimension_filter_clauses, as: 'dimensionFilterClauses', class: Google::Apis::AnalyticsreportingV4::DimensionFilterClause, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilterClause::Representation
property :start_group, as: 'startGroup'
end
end
class DateRangeValues
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :values, as: 'values'
collection :pivot_value_regions, as: 'pivotValueRegions', class: Google::Apis::AnalyticsreportingV4::PivotValueRegion, decorator: Google::Apis::AnalyticsreportingV4::PivotValueRegion::Representation
end
end
class MetricFilterClause
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :operator, as: 'operator'
collection :filters, as: 'filters', class: Google::Apis::AnalyticsreportingV4::MetricFilter, decorator: Google::Apis::AnalyticsreportingV4::MetricFilter::Representation
end
end
class Segment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dynamic_segment, as: 'dynamicSegment', class: Google::Apis::AnalyticsreportingV4::DynamicSegment, decorator: Google::Apis::AnalyticsreportingV4::DynamicSegment::Representation
property :segment_id, as: 'segmentId'
end
end
class DateRange
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :start_date, as: 'startDate'
property :end_date, as: 'endDate'
end
end
class ReportRow
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dimensions, as: 'dimensions'
collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
end
end
class CohortGroup
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :lifetime_value, as: 'lifetimeValue'
collection :cohorts, as: 'cohorts', class: Google::Apis::AnalyticsreportingV4::Cohort, decorator: Google::Apis::AnalyticsreportingV4::Cohort::Representation
end
end
class GetReportsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :reports, as: 'reports', class: Google::Apis::AnalyticsreportingV4::Report, decorator: Google::Apis::AnalyticsreportingV4::Report::Representation
collection :segment_filters, as: 'segmentFilters', class: Google::Apis::AnalyticsreportingV4::SegmentFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilter::Representation
end
end
@ -564,33 +570,27 @@ module Google
class MetricHeaderEntry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :type, as: 'type'
property :name, as: 'name'
end
end
class MetricFilter
class ReportData
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric_name, as: 'metricName'
property :operator, as: 'operator'
property :comparison_value, as: 'comparisonValue'
property :not, as: 'not'
end
end
collection :totals, as: 'totals', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
class Dimension
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :histogram_buckets, as: 'histogramBuckets'
property :name, as: 'name'
end
end
collection :samples_read_counts, as: 'samplesReadCounts'
property :row_count, as: 'rowCount'
collection :rows, as: 'rows', class: Google::Apis::AnalyticsreportingV4::ReportRow, decorator: Google::Apis::AnalyticsreportingV4::ReportRow::Representation
property :is_data_golden, as: 'isDataGolden'
property :data_last_refreshed, as: 'dataLastRefreshed'
collection :maximums, as: 'maximums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
collection :sampling_space_sizes, as: 'samplingSpaceSizes'
collection :minimums, as: 'minimums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
class PivotValueRegion
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :values, as: 'values'
end
end
end

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/android/work/play/emm-api
module AndroidenterpriseV1
VERSION = 'V1'
REVISION = '20170125'
REVISION = '20170131'
# Manage corporate Android devices
AUTH_ANDROIDENTERPRISE = 'https://www.googleapis.com/auth/androidenterprise'

View File

@ -1646,13 +1646,13 @@ module Google
# @return [Array<String>]
attr_accessor :product_id
# The interpretation of this product set. "unknown" should never be sent and
# The interpretation of this product set. "unknown" should never be sent and is
# ignored if received. "whitelist" means that this product set constitutes a
# whitelist. "includeAll" means that all products are accessible, including
# products that are approved, not approved, and even products where approval has
# been revoked. If the value is "includeAll", the value of the productId field
# is therefore ignored. If a value is not supplied, it is interpreted to be "
# whitelist" for backwards compatibility.
# products that are approved, products with revoked approval, and products that
# have never been approved. If the value is "includeAll", the value of the
# productId field is therefore ignored. If a value is not supplied, it is
# interpreted to be "whitelist" for backwards compatibility.
# Corresponds to the JSON property `productSetBehavior`
# @return [String]
attr_accessor :product_set_behavior

View File

@ -3168,7 +3168,9 @@ module Google
execute_or_queue_command(command, &block)
end
# Modifies the set of products a user is entitled to access.
# Modifies the set of products that a user is entitled to access (referred to as
# whitelisted products). Only products that are approved or products that were
# previously approved (products with revoked approval) can be whitelisted.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/games/services/web/api/states
module AppstateV1
VERSION = 'V1'
REVISION = '20170126'
REVISION = '20170201'
# View and manage your data for this application
AUTH_APPSTATE = 'https://www.googleapis.com/auth/appstate'

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/google-apps/calendar/firstapp
module CalendarV3
VERSION = 'V3'
REVISION = '20170129'
REVISION = '20170207'
# Manage your calendars
AUTH_CALENDAR = 'https://www.googleapis.com/auth/calendar'

View File

@ -25,37 +25,7 @@ module Google
# @see https://developers.google.com/classroom/
module ClassroomV1
VERSION = 'V1'
REVISION = '20170110'
# View instructions for teacher-assigned work in your Google Classroom classes
AUTH_CLASSROOM_COURSE_WORK_READONLY = 'https://www.googleapis.com/auth/classroom.course-work.readonly'
# Manage your Google Classroom classes
AUTH_CLASSROOM_COURSES = 'https://www.googleapis.com/auth/classroom.courses'
# View your Google Classroom classes
AUTH_CLASSROOM_COURSES_READONLY = 'https://www.googleapis.com/auth/classroom.courses.readonly'
# Manage your course work and view your grades in Google Classroom
AUTH_CLASSROOM_COURSEWORK_ME = 'https://www.googleapis.com/auth/classroom.coursework.me'
# View your course work and grades in Google Classroom
AUTH_CLASSROOM_COURSEWORK_ME_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.me.readonly'
# Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer
AUTH_CLASSROOM_COURSEWORK_STUDENTS = 'https://www.googleapis.com/auth/classroom.coursework.students'
# View course work and grades for students in the Google Classroom classes you teach or administer
AUTH_CLASSROOM_COURSEWORK_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.students.readonly'
# View the email addresses of people in your classes
AUTH_CLASSROOM_PROFILE_EMAILS = 'https://www.googleapis.com/auth/classroom.profile.emails'
# View the profile photos of people in your classes
AUTH_CLASSROOM_PROFILE_PHOTOS = 'https://www.googleapis.com/auth/classroom.profile.photos'
# Manage your Google Classroom class rosters
AUTH_CLASSROOM_ROSTERS = 'https://www.googleapis.com/auth/classroom.rosters'
REVISION = '20170213'
# View your Google Classroom class rosters
AUTH_CLASSROOM_ROSTERS_READONLY = 'https://www.googleapis.com/auth/classroom.rosters.readonly'
@ -63,8 +33,35 @@ module Google
# View your course work and grades in Google Classroom
AUTH_CLASSROOM_STUDENT_SUBMISSIONS_ME_READONLY = 'https://www.googleapis.com/auth/classroom.student-submissions.me.readonly'
# View course work and grades for students in the Google Classroom classes you teach or administer
AUTH_CLASSROOM_COURSEWORK_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.students.readonly'
# View course work and grades for students in the Google Classroom classes you teach or administer
AUTH_CLASSROOM_STUDENT_SUBMISSIONS_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.student-submissions.students.readonly'
# Manage your Google Classroom class rosters
AUTH_CLASSROOM_ROSTERS = 'https://www.googleapis.com/auth/classroom.rosters'
# View your course work and grades in Google Classroom
AUTH_CLASSROOM_COURSEWORK_ME_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.me.readonly'
# View your Google Classroom classes
AUTH_CLASSROOM_COURSES_READONLY = 'https://www.googleapis.com/auth/classroom.courses.readonly'
# Manage your Google Classroom classes
AUTH_CLASSROOM_COURSES = 'https://www.googleapis.com/auth/classroom.courses'
# Manage your course work and view your grades in Google Classroom
AUTH_CLASSROOM_COURSEWORK_ME = 'https://www.googleapis.com/auth/classroom.coursework.me'
# Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer
AUTH_CLASSROOM_COURSEWORK_STUDENTS = 'https://www.googleapis.com/auth/classroom.coursework.students'
# View the profile photos of people in your classes
AUTH_CLASSROOM_PROFILE_PHOTOS = 'https://www.googleapis.com/auth/classroom.profile.photos'
# View the email addresses of people in your classes
AUTH_CLASSROOM_PROFILE_EMAILS = 'https://www.googleapis.com/auth/classroom.profile.emails'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/container-builder/docs/
module CloudbuildV1
VERSION = 'V1'
REVISION = '20170202'
REVISION = '20170213'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -22,6 +22,202 @@ module Google
module Apis
module CloudbuildV1
# BuiltImage describes an image built by the pipeline.
class BuiltImage
include Google::Apis::Core::Hashable
# Name used to push the container image to Google Container Registry, as
# presented to `docker push`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Docker Registry 2.0 digest.
# Corresponds to the JSON property `digest`
# @return [String]
attr_accessor :digest
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@digest = args[:digest] if args.key?(:digest)
end
end
# RepoSource describes the location of the source in a Google Cloud Source
# Repository.
class RepoSource
include Google::Apis::Core::Hashable
# Name of the tag to build.
# Corresponds to the JSON property `tagName`
# @return [String]
attr_accessor :tag_name
# Explicit commit SHA to build.
# Corresponds to the JSON property `commitSha`
# @return [String]
attr_accessor :commit_sha
# ID of the project that owns the repo. If omitted, the project ID requesting
# the build is assumed.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# Name of the repo. If omitted, the name "default" is assumed.
# Corresponds to the JSON property `repoName`
# @return [String]
attr_accessor :repo_name
# Name of the branch to build.
# Corresponds to the JSON property `branchName`
# @return [String]
attr_accessor :branch_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@tag_name = args[:tag_name] if args.key?(:tag_name)
@commit_sha = args[:commit_sha] if args.key?(:commit_sha)
@project_id = args[:project_id] if args.key?(:project_id)
@repo_name = args[:repo_name] if args.key?(:repo_name)
@branch_name = args[:branch_name] if args.key?(:branch_name)
end
end
# BuildStep describes a step to perform in the build pipeline.
class BuildStep
include Google::Apis::Core::Hashable
# Optional entrypoint to be used instead of the build step image's default
# If unset, the image's default will be used.
# Corresponds to the JSON property `entrypoint`
# @return [String]
attr_accessor :entrypoint
# Optional unique identifier for this build step, used in wait_for to
# reference this build step as a dependency.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Working directory (relative to project source root) to use when running
# this operation's container.
# Corresponds to the JSON property `dir`
# @return [String]
attr_accessor :dir
# The ID(s) of the step(s) that this build step depends on.
# This build step will not start until all the build steps in wait_for
# have completed successfully. If wait_for is empty, this build step will
# start when all previous build steps in the Build.Steps list have completed
# successfully.
# Corresponds to the JSON property `waitFor`
# @return [Array<String>]
attr_accessor :wait_for
# A list of environment variable definitions to be used when running a step.
# The elements are of the form "KEY=VALUE" for the environment variable "KEY"
# being given the value "VALUE".
# Corresponds to the JSON property `env`
# @return [Array<String>]
attr_accessor :env
# A list of arguments that will be presented to the step when it is started.
# If the image used to run the step's container has an entrypoint, these args
# will be used as arguments to that entrypoint. If the image does not define
# an entrypoint, the first element in args will be used as the entrypoint,
# and the remainder will be used as arguments.
# Corresponds to the JSON property `args`
# @return [Array<String>]
attr_accessor :args
# The name of the container image that will run this particular build step.
# If the image is already available in the host's Docker daemon's cache, it
# will be run directly. If not, the host will attempt to pull the image
# first, using the builder service account's credentials if necessary.
# The Docker daemon's cache will already have the latest versions of all of
# the officially supported build steps
# (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
# will also have cached many of the layers for some popular images, like
# "ubuntu", "debian", but they will be refreshed at the time you attempt to
# use them.
# If you built an image in a previous build step, it will be stored in the
# host's Docker daemon's cache and is available to use as the name for a
# later build step.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entrypoint = args[:entrypoint] if args.key?(:entrypoint)
@id = args[:id] if args.key?(:id)
@dir = args[:dir] if args.key?(:dir)
@wait_for = args[:wait_for] if args.key?(:wait_for)
@env = args[:env] if args.key?(:env)
@args = args[:args] if args.key?(:args)
@name = args[:name] if args.key?(:name)
end
end
# Container message for hash values.
class HashProp
include Google::Apis::Core::Hashable
# The type of hash that was performed.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The hash value.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
@value = args[:value] if args.key?(:value)
end
end
# Container message for hashes of byte content of files, used in
# SourceProvenance messages to verify integrity of source input to the build.
class FileHashes
include Google::Apis::Core::Hashable
# Collection of file hashes.
# Corresponds to the JSON property `fileHash`
# @return [Array<Google::Apis::CloudbuildV1::HashProp>]
attr_accessor :file_hash
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@file_hash = args[:file_hash] if args.key?(:file_hash)
end
end
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by
# [gRPC](https://github.com/grpc). The error model is designed to be:
@ -163,18 +359,18 @@ module Google
attr_accessor :disabled
alias_method :disabled?, :disabled
# Path, from the source root, to a file whose contents is used for the
# template.
# Corresponds to the JSON property `filename`
# @return [String]
attr_accessor :filename
# RepoSource describes the location of the source in a Google Cloud Source
# Repository.
# Corresponds to the JSON property `triggerTemplate`
# @return [Google::Apis::CloudbuildV1::RepoSource]
attr_accessor :trigger_template
# Path, from the source root, to a file whose contents is used for the
# template.
# Corresponds to the JSON property `filename`
# @return [String]
attr_accessor :filename
def initialize(**args)
update!(**args)
end
@ -187,8 +383,8 @@ module Google
@description = args[:description] if args.key?(:description)
@create_time = args[:create_time] if args.key?(:create_time)
@disabled = args[:disabled] if args.key?(:disabled)
@filename = args[:filename] if args.key?(:filename)
@trigger_template = args[:trigger_template] if args.key?(:trigger_template)
@filename = args[:filename] if args.key?(:filename)
end
end
@ -208,6 +404,45 @@ module Google
class Build
include Google::Apis::Core::Hashable
# Amount of time that this build should be allowed to run, to second
# granularity. If this amount of time elapses, work on the build will cease
# and the build status will be TIMEOUT.
# Default time is ten minutes.
# Corresponds to the JSON property `timeout`
# @return [String]
attr_accessor :timeout
# Status of the build.
# @OutputOnly
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# Customer-readable message about the current status.
# @OutputOnly
# Corresponds to the JSON property `statusDetail`
# @return [String]
attr_accessor :status_detail
# Google Cloud Storage bucket where logs should be written (see
# [Bucket Name
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
# ).
# Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`.
# Corresponds to the JSON property `logsBucket`
# @return [String]
attr_accessor :logs_bucket
# Results describes the artifacts created by the build pipeline.
# Corresponds to the JSON property `results`
# @return [Google::Apis::CloudbuildV1::Results]
attr_accessor :results
# Describes the operations to be performed on the workspace.
# Corresponds to the JSON property `steps`
# @return [Array<Google::Apis::CloudbuildV1::BuildStep>]
attr_accessor :steps
# The ID of the BuildTrigger that triggered this build, if it was
# triggered automatically.
# @OutputOnly
@ -221,17 +456,17 @@ module Google
# @return [String]
attr_accessor :id
# Substitutions data for Build resource.
# Corresponds to the JSON property `substitutions`
# @return [Hash<String,String>]
attr_accessor :substitutions
# Time at which execution of the build was started.
# @OutputOnly
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# Substitutions data for Build resource.
# Corresponds to the JSON property `substitutions`
# @return [Hash<String,String>]
attr_accessor :substitutions
# Time at which the request to create the build was received.
# @OutputOnly
# Corresponds to the JSON property `createTime`
@ -260,12 +495,6 @@ module Google
# @return [String]
attr_accessor :project_id
# URL to logs for this build in Google Cloud Logging.
# @OutputOnly
# Corresponds to the JSON property `logUrl`
# @return [String]
attr_accessor :log_url
# Time at which execution of the build was finished.
# The difference between finish_time and start_time is the duration of the
# build's execution.
@ -274,10 +503,11 @@ module Google
# @return [String]
attr_accessor :finish_time
# Optional arguments to enable specific features of builds.
# Corresponds to the JSON property `options`
# @return [Google::Apis::CloudbuildV1::BuildOptions]
attr_accessor :options
# URL to logs for this build in Google Cloud Logging.
# @OutputOnly
# Corresponds to the JSON property `logUrl`
# @return [String]
attr_accessor :log_url
# Source describes the location of the source in a supported storage
# service.
@ -285,44 +515,10 @@ module Google
# @return [Google::Apis::CloudbuildV1::Source]
attr_accessor :source
# Customer-readable message about the current status.
# @OutputOnly
# Corresponds to the JSON property `statusDetail`
# @return [String]
attr_accessor :status_detail
# Status of the build.
# @OutputOnly
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# Amount of time that this build should be allowed to run, to second
# granularity. If this amount of time elapses, work on the build will cease
# and the build status will be TIMEOUT.
# Default time is ten minutes.
# Corresponds to the JSON property `timeout`
# @return [String]
attr_accessor :timeout
# Google Cloud Storage bucket where logs should be written (see
# [Bucket Name
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
# ).
# Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`.
# Corresponds to the JSON property `logsBucket`
# @return [String]
attr_accessor :logs_bucket
# Results describes the artifacts created by the build pipeline.
# Corresponds to the JSON property `results`
# @return [Google::Apis::CloudbuildV1::Results]
attr_accessor :results
# Describes the operations to be performed on the workspace.
# Corresponds to the JSON property `steps`
# @return [Array<Google::Apis::CloudbuildV1::BuildStep>]
attr_accessor :steps
# Optional arguments to enable specific features of builds.
# Corresponds to the JSON property `options`
# @return [Google::Apis::CloudbuildV1::BuildOptions]
attr_accessor :options
def initialize(**args)
update!(**args)
@ -330,24 +526,24 @@ module Google
# Update properties of this object
def update!(**args)
@timeout = args[:timeout] if args.key?(:timeout)
@status = args[:status] if args.key?(:status)
@status_detail = args[:status_detail] if args.key?(:status_detail)
@logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
@results = args[:results] if args.key?(:results)
@steps = args[:steps] if args.key?(:steps)
@build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id)
@id = args[:id] if args.key?(:id)
@substitutions = args[:substitutions] if args.key?(:substitutions)
@start_time = args[:start_time] if args.key?(:start_time)
@substitutions = args[:substitutions] if args.key?(:substitutions)
@create_time = args[:create_time] if args.key?(:create_time)
@source_provenance = args[:source_provenance] if args.key?(:source_provenance)
@images = args[:images] if args.key?(:images)
@project_id = args[:project_id] if args.key?(:project_id)
@log_url = args[:log_url] if args.key?(:log_url)
@finish_time = args[:finish_time] if args.key?(:finish_time)
@options = args[:options] if args.key?(:options)
@log_url = args[:log_url] if args.key?(:log_url)
@source = args[:source] if args.key?(:source)
@status_detail = args[:status_detail] if args.key?(:status_detail)
@status = args[:status] if args.key?(:status)
@timeout = args[:timeout] if args.key?(:timeout)
@logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
@results = args[:results] if args.key?(:results)
@steps = args[:steps] if args.key?(:steps)
@options = args[:options] if args.key?(:options)
end
end
@ -419,26 +615,26 @@ module Google
class Source
include Google::Apis::Core::Hashable
# StorageSource describes the location of the source in an archive file in
# Google Cloud Storage.
# Corresponds to the JSON property `storageSource`
# @return [Google::Apis::CloudbuildV1::StorageSource]
attr_accessor :storage_source
# RepoSource describes the location of the source in a Google Cloud Source
# Repository.
# Corresponds to the JSON property `repoSource`
# @return [Google::Apis::CloudbuildV1::RepoSource]
attr_accessor :repo_source
# StorageSource describes the location of the source in an archive file in
# Google Cloud Storage.
# Corresponds to the JSON property `storageSource`
# @return [Google::Apis::CloudbuildV1::StorageSource]
attr_accessor :storage_source
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@storage_source = args[:storage_source] if args.key?(:storage_source)
@repo_source = args[:repo_source] if args.key?(:repo_source)
@storage_source = args[:storage_source] if args.key?(:storage_source)
end
end
@ -446,24 +642,24 @@ module Google
class BuildOptions
include Google::Apis::Core::Hashable
# Requested hash for SourceProvenance.
# Corresponds to the JSON property `sourceProvenanceHash`
# @return [Array<String>]
attr_accessor :source_provenance_hash
# Requested verifiability options.
# Corresponds to the JSON property `requestedVerifyOption`
# @return [String]
attr_accessor :requested_verify_option
# Requested hash for SourceProvenance.
# Corresponds to the JSON property `sourceProvenanceHash`
# @return [Array<String>]
attr_accessor :source_provenance_hash
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash)
@requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option)
@source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash)
end
end
@ -472,12 +668,6 @@ module Google
class StorageSource
include Google::Apis::Core::Hashable
# Google Cloud Storage generation for the object. If the generation is
# omitted, the latest generation will be used.
# Corresponds to the JSON property `generation`
# @return [String]
attr_accessor :generation
# Google Cloud Storage bucket containing source (see
# [Bucket Name
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
@ -493,15 +683,21 @@ module Google
# @return [String]
attr_accessor :object
# Google Cloud Storage generation for the object. If the generation is
# omitted, the latest generation will be used.
# Corresponds to the JSON property `generation`
# @return [String]
attr_accessor :generation
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@generation = args[:generation] if args.key?(:generation)
@bucket = args[:bucket] if args.key?(:bucket)
@object = args[:object] if args.key?(:object)
@generation = args[:generation] if args.key?(:generation)
end
end
@ -509,24 +705,24 @@ module Google
class Results
include Google::Apis::Core::Hashable
# Images that were built as a part of the build.
# Corresponds to the JSON property `images`
# @return [Array<Google::Apis::CloudbuildV1::BuiltImage>]
attr_accessor :images
# List of build step digests, in order corresponding to build step indices.
# Corresponds to the JSON property `buildStepImages`
# @return [Array<String>]
attr_accessor :build_step_images
# Images that were built as a part of the build.
# Corresponds to the JSON property `images`
# @return [Array<Google::Apis::CloudbuildV1::BuiltImage>]
attr_accessor :images
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@images = args[:images] if args.key?(:images)
@build_step_images = args[:build_step_images] if args.key?(:build_step_images)
@images = args[:images] if args.key?(:images)
end
end
@ -566,18 +762,6 @@ module Google
class SourceProvenance
include Google::Apis::Core::Hashable
# Hash(es) of the build source, which can be used to verify that the original
# source integrity was maintained in the build. Note that FileHashes will
# only be populated if BuildOptions has requested a SourceProvenanceHash.
# The keys to this map are file paths used as build source and the values
# contain the hash values for those files.
# If the build source came in a single package such as a gzipped tarfile
# (.tar.gz), the FileHash will be for the single path to that file.
# @OutputOnly
# Corresponds to the JSON property `fileHashes`
# @return [Hash<String,Google::Apis::CloudbuildV1::FileHashes>]
attr_accessor :file_hashes
# RepoSource describes the location of the source in a Google Cloud Source
# Repository.
# Corresponds to the JSON property `resolvedRepoSource`
@ -590,15 +774,27 @@ module Google
# @return [Google::Apis::CloudbuildV1::StorageSource]
attr_accessor :resolved_storage_source
# Hash(es) of the build source, which can be used to verify that the original
# source integrity was maintained in the build. Note that FileHashes will
# only be populated if BuildOptions has requested a SourceProvenanceHash.
# The keys to this map are file paths used as build source and the values
# contain the hash values for those files.
# If the build source came in a single package such as a gzipped tarfile
# (.tar.gz), the FileHash will be for the single path to that file.
# @OutputOnly
# Corresponds to the JSON property `fileHashes`
# @return [Hash<String,Google::Apis::CloudbuildV1::FileHashes>]
attr_accessor :file_hashes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@file_hashes = args[:file_hashes] if args.key?(:file_hashes)
@resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
@resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
@file_hashes = args[:file_hashes] if args.key?(:file_hashes)
end
end
@ -615,30 +811,19 @@ module Google
end
end
# Response containing existing BuildTriggers.
class ListBuildTriggersResponse
include Google::Apis::Core::Hashable
# BuildTriggers for the project, sorted by create_time descending.
# Corresponds to the JSON property `triggers`
# @return [Array<Google::Apis::CloudbuildV1::BuildTrigger>]
attr_accessor :triggers
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@triggers = args[:triggers] if args.key?(:triggers)
end
end
# This resource represents a long-running operation that is the result of a
# network API call.
class Operation
include Google::Apis::Core::Hashable
# Service-specific metadata associated with the operation. It typically
# contains progress information and common metadata such as create time.
# Some services might not provide such metadata. Any method that returns a
# long-running operation should document the metadata type, if any.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# If the value is `false`, it means the operation is still in progress.
# If true, the operation is completed, and either `error` or `response` is
# available.
@ -709,42 +894,28 @@ module Google
# @return [Google::Apis::CloudbuildV1::Status]
attr_accessor :error
# Service-specific metadata associated with the operation. It typically
# contains progress information and common metadata such as create time.
# Some services might not provide such metadata. Any method that returns a
# long-running operation should document the metadata type, if any.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metadata = args[:metadata] if args.key?(:metadata)
@done = args[:done] if args.key?(:done)
@response = args[:response] if args.key?(:response)
@name = args[:name] if args.key?(:name)
@error = args[:error] if args.key?(:error)
@metadata = args[:metadata] if args.key?(:metadata)
end
end
# BuiltImage describes an image built by the pipeline.
class BuiltImage
# Response containing existing BuildTriggers.
class ListBuildTriggersResponse
include Google::Apis::Core::Hashable
# Name used to push the container image to Google Container Registry, as
# presented to `docker push`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Docker Registry 2.0 digest.
# Corresponds to the JSON property `digest`
# @return [String]
attr_accessor :digest
# BuildTriggers for the project, sorted by create_time descending.
# Corresponds to the JSON property `triggers`
# @return [Array<Google::Apis::CloudbuildV1::BuildTrigger>]
attr_accessor :triggers
def initialize(**args)
update!(**args)
@ -752,178 +923,7 @@ module Google
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@digest = args[:digest] if args.key?(:digest)
end
end
# Container message for hash values.
class HashProp
include Google::Apis::Core::Hashable
# The type of hash that was performed.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The hash value.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
@value = args[:value] if args.key?(:value)
end
end
# RepoSource describes the location of the source in a Google Cloud Source
# Repository.
class RepoSource
include Google::Apis::Core::Hashable
# Name of the tag to build.
# Corresponds to the JSON property `tagName`
# @return [String]
attr_accessor :tag_name
# Explicit commit SHA to build.
# Corresponds to the JSON property `commitSha`
# @return [String]
attr_accessor :commit_sha
# ID of the project that owns the repo. If omitted, the project ID requesting
# the build is assumed.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# Name of the repo. If omitted, the name "default" is assumed.
# Corresponds to the JSON property `repoName`
# @return [String]
attr_accessor :repo_name
# Name of the branch to build.
# Corresponds to the JSON property `branchName`
# @return [String]
attr_accessor :branch_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@tag_name = args[:tag_name] if args.key?(:tag_name)
@commit_sha = args[:commit_sha] if args.key?(:commit_sha)
@project_id = args[:project_id] if args.key?(:project_id)
@repo_name = args[:repo_name] if args.key?(:repo_name)
@branch_name = args[:branch_name] if args.key?(:branch_name)
end
end
# BuildStep describes a step to perform in the build pipeline.
class BuildStep
include Google::Apis::Core::Hashable
# The ID(s) of the step(s) that this build step depends on.
# This build step will not start until all the build steps in wait_for
# have completed successfully. If wait_for is empty, this build step will
# start when all previous build steps in the Build.Steps list have completed
# successfully.
# Corresponds to the JSON property `waitFor`
# @return [Array<String>]
attr_accessor :wait_for
# A list of environment variable definitions to be used when running a step.
# The elements are of the form "KEY=VALUE" for the environment variable "KEY"
# being given the value "VALUE".
# Corresponds to the JSON property `env`
# @return [Array<String>]
attr_accessor :env
# A list of arguments that will be presented to the step when it is started.
# If the image used to run the step's container has an entrypoint, these args
# will be used as arguments to that entrypoint. If the image does not define
# an entrypoint, the first element in args will be used as the entrypoint,
# and the remainder will be used as arguments.
# Corresponds to the JSON property `args`
# @return [Array<String>]
attr_accessor :args
# The name of the container image that will run this particular build step.
# If the image is already available in the host's Docker daemon's cache, it
# will be run directly. If not, the host will attempt to pull the image
# first, using the builder service account's credentials if necessary.
# The Docker daemon's cache will already have the latest versions of all of
# the officially supported build steps
# (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
# will also have cached many of the layers for some popular images, like
# "ubuntu", "debian", but they will be refreshed at the time you attempt to
# use them.
# If you built an image in a previous build step, it will be stored in the
# host's Docker daemon's cache and is available to use as the name for a
# later build step.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Optional entrypoint to be used instead of the build step image's default
# If unset, the image's default will be used.
# Corresponds to the JSON property `entrypoint`
# @return [String]
attr_accessor :entrypoint
# Optional unique identifier for this build step, used in wait_for to
# reference this build step as a dependency.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Working directory (relative to project source root) to use when running
# this operation's container.
# Corresponds to the JSON property `dir`
# @return [String]
attr_accessor :dir
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@wait_for = args[:wait_for] if args.key?(:wait_for)
@env = args[:env] if args.key?(:env)
@args = args[:args] if args.key?(:args)
@name = args[:name] if args.key?(:name)
@entrypoint = args[:entrypoint] if args.key?(:entrypoint)
@id = args[:id] if args.key?(:id)
@dir = args[:dir] if args.key?(:dir)
end
end
# Container message for hashes of byte content of files, used in
# SourceProvenance messages to verify integrity of source input to the build.
class FileHashes
include Google::Apis::Core::Hashable
# Collection of file hashes.
# Corresponds to the JSON property `fileHash`
# @return [Array<Google::Apis::CloudbuildV1::HashProp>]
attr_accessor :file_hash
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@file_hash = args[:file_hash] if args.key?(:file_hash)
@triggers = args[:triggers] if args.key?(:triggers)
end
end
end

View File

@ -22,6 +22,36 @@ module Google
module Apis
module CloudbuildV1
class BuiltImage
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RepoSource
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BuildStep
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class HashProp
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FileHashes
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Status
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -106,46 +136,64 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListBuildTriggersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BuiltImage
class ListBuildTriggersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class HashProp
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
class BuiltImage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :digest, as: 'digest'
end
end
class RepoSource
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :tag_name, as: 'tagName'
property :commit_sha, as: 'commitSha'
property :project_id, as: 'projectId'
property :repo_name, as: 'repoName'
property :branch_name, as: 'branchName'
end
end
class BuildStep
class Representation < Google::Apis::Core::JsonRepresentation; end
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :entrypoint, as: 'entrypoint'
property :id, as: 'id'
property :dir, as: 'dir'
collection :wait_for, as: 'waitFor'
collection :env, as: 'env'
collection :args, as: 'args'
property :name, as: 'name'
end
end
include Google::Apis::Core::JsonObjectSupport
class HashProp
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value, :base64 => true, as: 'value'
end
end
class FileHashes
class Representation < Google::Apis::Core::JsonRepresentation; end
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :file_hash, as: 'fileHash', class: Google::Apis::CloudbuildV1::HashProp, decorator: Google::Apis::CloudbuildV1::HashProp::Representation
include Google::Apis::Core::JsonObjectSupport
end
end
class Status
@ -173,37 +221,37 @@ module Google
property :description, as: 'description'
property :create_time, as: 'createTime'
property :disabled, as: 'disabled'
property :filename, as: 'filename'
property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation
property :filename, as: 'filename'
end
end
class Build
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :timeout, as: 'timeout'
property :status, as: 'status'
property :status_detail, as: 'statusDetail'
property :logs_bucket, as: 'logsBucket'
property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation
collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation
property :build_trigger_id, as: 'buildTriggerId'
property :id, as: 'id'
hash :substitutions, as: 'substitutions'
property :start_time, as: 'startTime'
hash :substitutions, as: 'substitutions'
property :create_time, as: 'createTime'
property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation
collection :images, as: 'images'
property :project_id, as: 'projectId'
property :log_url, as: 'logUrl'
property :finish_time, as: 'finishTime'
property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation
property :log_url, as: 'logUrl'
property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation
property :status_detail, as: 'statusDetail'
property :status, as: 'status'
property :timeout, as: 'timeout'
property :logs_bucket, as: 'logsBucket'
property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation
collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation
property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation
end
end
@ -235,36 +283,36 @@ module Google
class Source
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :storage_source, as: 'storageSource', class: Google::Apis::CloudbuildV1::StorageSource, decorator: Google::Apis::CloudbuildV1::StorageSource::Representation
property :repo_source, as: 'repoSource', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation
property :storage_source, as: 'storageSource', class: Google::Apis::CloudbuildV1::StorageSource, decorator: Google::Apis::CloudbuildV1::StorageSource::Representation
end
end
class BuildOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :source_provenance_hash, as: 'sourceProvenanceHash'
property :requested_verify_option, as: 'requestedVerifyOption'
collection :source_provenance_hash, as: 'sourceProvenanceHash'
end
end
class StorageSource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :generation, as: 'generation'
property :bucket, as: 'bucket'
property :object, as: 'object'
property :generation, as: 'generation'
end
end
class Results
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :build_step_images, as: 'buildStepImages'
collection :images, as: 'images', class: Google::Apis::CloudbuildV1::BuiltImage, decorator: Google::Apis::CloudbuildV1::BuiltImage::Representation
collection :build_step_images, as: 'buildStepImages'
end
end
@ -279,12 +327,12 @@ module Google
class SourceProvenance
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :file_hashes, as: 'fileHashes', class: Google::Apis::CloudbuildV1::FileHashes, decorator: Google::Apis::CloudbuildV1::FileHashes::Representation
property :resolved_repo_source, as: 'resolvedRepoSource', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation
property :resolved_storage_source, as: 'resolvedStorageSource', class: Google::Apis::CloudbuildV1::StorageSource, decorator: Google::Apis::CloudbuildV1::StorageSource::Representation
hash :file_hashes, as: 'fileHashes', class: Google::Apis::CloudbuildV1::FileHashes, decorator: Google::Apis::CloudbuildV1::FileHashes::Representation
end
end
@ -294,6 +342,18 @@ module Google
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :metadata, as: 'metadata'
property :done, as: 'done'
hash :response, as: 'response'
property :name, as: 'name'
property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation
end
end
class ListBuildTriggersResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -301,66 +361,6 @@ module Google
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
hash :response, as: 'response'
property :name, as: 'name'
property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation
hash :metadata, as: 'metadata'
end
end
class BuiltImage
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :digest, as: 'digest'
end
end
class HashProp
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value, :base64 => true, as: 'value'
end
end
class RepoSource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :tag_name, as: 'tagName'
property :commit_sha, as: 'commitSha'
property :project_id, as: 'projectId'
property :repo_name, as: 'repoName'
property :branch_name, as: 'branchName'
end
end
class BuildStep
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :wait_for, as: 'waitFor'
collection :env, as: 'env'
collection :args, as: 'args'
property :name, as: 'name'
property :entrypoint, as: 'entrypoint'
property :id, as: 'id'
property :dir, as: 'dir'
end
end
class FileHashes
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :file_hash, as: 'fileHash', class: Google::Apis::CloudbuildV1::HashProp, decorator: Google::Apis::CloudbuildV1::HashProp::Representation
end
end
end
end
end

View File

@ -32,16 +32,16 @@ module Google
#
# @see https://cloud.google.com/container-builder/docs/
class CloudBuildService < 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
# @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
def initialize
super('https://cloudbuild.googleapis.com/', '')
end
@ -59,11 +59,11 @@ module Google
# @param [String] name
# The name of the operation resource to be cancelled.
# @param [Google::Apis::CloudbuildV1::CancelOperationRequest] cancel_operation_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -76,15 +76,15 @@ 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 cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation
command.request_object = cancel_operation_request_object
command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
command.response_class = Google::Apis::CloudbuildV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -100,11 +100,11 @@ module Google
# The standard list page size.
# @param [String] filter
# The standard list filter.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -117,7 +117,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 list_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_operations(name, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation
command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse
@ -125,8 +125,8 @@ module Google
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -135,11 +135,11 @@ module Google
# service.
# @param [String] name
# The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -152,13 +152,13 @@ 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 get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
def get_operation(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
command.response_class = Google::Apis::CloudbuildV1::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -168,11 +168,11 @@ module Google
# ID of the project that owns the trigger.
# @param [String] trigger_id
# ID of the BuildTrigger to delete.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -185,14 +185,14 @@ 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 delete_project_trigger(project_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block)
def delete_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/projects/{projectId}/triggers/{triggerId}', options)
command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
command.response_class = Google::Apis::CloudbuildV1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.params['triggerId'] = trigger_id unless trigger_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -202,11 +202,11 @@ module Google
# ID of the project that owns the trigger.
# @param [String] trigger_id
# ID of the BuildTrigger to get.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -219,14 +219,14 @@ 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 get_project_trigger(project_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block)
def get_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/triggers/{triggerId}', options)
command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
command.response_class = Google::Apis::CloudbuildV1::BuildTrigger
command.params['projectId'] = project_id unless project_id.nil?
command.params['triggerId'] = trigger_id unless trigger_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -234,11 +234,11 @@ module Google
# This API is experimental.
# @param [String] project_id
# ID of the project for which to list BuildTriggers.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -251,13 +251,13 @@ 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 list_project_triggers(project_id, fields: nil, quota_user: nil, options: nil, &block)
def list_project_triggers(project_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/triggers', options)
command.response_representation = Google::Apis::CloudbuildV1::ListBuildTriggersResponse::Representation
command.response_class = Google::Apis::CloudbuildV1::ListBuildTriggersResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -268,11 +268,11 @@ module Google
# @param [String] trigger_id
# ID of the BuildTrigger to update.
# @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -285,7 +285,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 patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/projects/{projectId}/triggers/{triggerId}', options)
command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
command.request_object = build_trigger_object
@ -293,8 +293,8 @@ module Google
command.response_class = Google::Apis::CloudbuildV1::BuildTrigger
command.params['projectId'] = project_id unless project_id.nil?
command.params['triggerId'] = trigger_id unless trigger_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -303,11 +303,11 @@ module Google
# @param [String] project_id
# ID of the project for which to configure automatic builds.
# @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -320,15 +320,15 @@ 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 create_project_trigger(project_id, build_trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def create_project_trigger(project_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/triggers', options)
command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
command.request_object = build_trigger_object
command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
command.response_class = Google::Apis::CloudbuildV1::BuildTrigger
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -338,11 +338,11 @@ module Google
# @param [String] id
# ID of the build.
# @param [Google::Apis::CloudbuildV1::CancelBuildRequest] cancel_build_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -355,7 +355,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 cancel_build(project_id, id, cancel_build_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def cancel_build(project_id, id, cancel_build_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/builds/{id}:cancel', options)
command.request_representation = Google::Apis::CloudbuildV1::CancelBuildRequest::Representation
command.request_object = cancel_build_request_object
@ -363,8 +363,8 @@ module Google
command.response_class = Google::Apis::CloudbuildV1::Build
command.params['projectId'] = project_id unless project_id.nil?
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -375,11 +375,11 @@ module Google
# ID of the project.
# @param [String] id
# ID of the build.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -392,14 +392,14 @@ 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 get_project_build(project_id, id, fields: nil, quota_user: nil, options: nil, &block)
def get_project_build(project_id, id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/builds/{id}', options)
command.response_representation = Google::Apis::CloudbuildV1::Build::Representation
command.response_class = Google::Apis::CloudbuildV1::Build
command.params['projectId'] = project_id unless project_id.nil?
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -408,17 +408,17 @@ module Google
# successfully or unsuccessfully.
# @param [String] project_id
# ID of the project.
# @param [String] filter
# The raw filter text to constrain the results.
# @param [String] page_token
# Token to provide to skip to a particular spot in the list.
# @param [Fixnum] page_size
# Number of results to return in the list.
# @param [String] filter
# The raw filter text to constrain the results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -431,16 +431,16 @@ 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 list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_builds(project_id, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/builds', options)
command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation
command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -451,11 +451,11 @@ module Google
# @param [String] project_id
# ID of the project.
# @param [Google::Apis::CloudbuildV1::Build] build_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -468,23 +468,23 @@ 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 create_project_build(project_id, build_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def create_project_build(project_id, build_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options)
command.request_representation = Google::Apis::CloudbuildV1::Build::Representation
command.request_object = build_object
command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
command.response_class = Google::Apis::CloudbuildV1::Operation
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.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?
command.query['key'] = key unless key.nil?
end
end
end

View File

@ -26,13 +26,13 @@ module Google
# @see http://cloud.google.com/debugger
module ClouddebuggerV2
VERSION = 'V2'
REVISION = '20170117'
# Manage cloud debugger
AUTH_CLOUD_DEBUGGER = 'https://www.googleapis.com/auth/cloud_debugger'
REVISION = '20170208'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# Manage cloud debugger
AUTH_CLOUD_DEBUGGER = 'https://www.googleapis.com/auth/cloud_debugger'
end
end
end

View File

@ -22,109 +22,6 @@ module Google
module Apis
module ClouddebuggerV2
# A CloudRepoSourceContext denotes a particular revision in a cloud
# repo (a repo hosted by the Google Cloud Platform).
class CloudRepoSourceContext
include Google::Apis::Core::Hashable
# A revision ID.
# Corresponds to the JSON property `revisionId`
# @return [String]
attr_accessor :revision_id
# The name of an alias (branch, tag, etc.).
# Corresponds to the JSON property `aliasName`
# @return [String]
attr_accessor :alias_name
# A unique identifier for a cloud repo.
# Corresponds to the JSON property `repoId`
# @return [Google::Apis::ClouddebuggerV2::RepoId]
attr_accessor :repo_id
# An alias to a repo revision.
# Corresponds to the JSON property `aliasContext`
# @return [Google::Apis::ClouddebuggerV2::AliasContext]
attr_accessor :alias_context
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@revision_id = args[:revision_id] if args.key?(:revision_id)
@alias_name = args[:alias_name] if args.key?(:alias_name)
@repo_id = args[:repo_id] if args.key?(:repo_id)
@alias_context = args[:alias_context] if args.key?(:alias_context)
end
end
# Request to register a debuggee.
class RegisterDebuggeeRequest
include Google::Apis::Core::Hashable
# Represents the application to debug. The application may include one or more
# replicated processes executing the same code. Each of these processes is
# attached with a debugger agent, carrying out the debugging commands.
# The agents attached to the same debuggee are identified by using exactly the
# same field values when registering.
# Corresponds to the JSON property `debuggee`
# @return [Google::Apis::ClouddebuggerV2::Debuggee]
attr_accessor :debuggee
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@debuggee = args[:debuggee] if args.key?(:debuggee)
end
end
# Response for registering a debuggee.
class RegisterDebuggeeResponse
include Google::Apis::Core::Hashable
# Represents the application to debug. The application may include one or more
# replicated processes executing the same code. Each of these processes is
# attached with a debugger agent, carrying out the debugging commands.
# The agents attached to the same debuggee are identified by using exactly the
# same field values when registering.
# Corresponds to the JSON property `debuggee`
# @return [Google::Apis::ClouddebuggerV2::Debuggee]
attr_accessor :debuggee
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@debuggee = args[:debuggee] if args.key?(:debuggee)
end
end
# Response for getting breakpoint information.
class GetBreakpointResponse
include Google::Apis::Core::Hashable
# Represents the breakpoint specification, status and results.
# Corresponds to the JSON property `breakpoint`
# @return [Google::Apis::ClouddebuggerV2::Breakpoint]
attr_accessor :breakpoint
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@breakpoint = args[:breakpoint] if args.key?(:breakpoint)
end
end
# Represents a contextual status message.
# The message can indicate an error or informational status, and refer to
# specific parts of the containing object.
@ -273,18 +170,6 @@ module Google
class Variable
include Google::Apis::Core::Hashable
# Reference to a variable in the shared variable table. More than
# one variable can reference the same variable in the table. The
# `var_table_index` field is an index into `variable_table` in Breakpoint.
# Corresponds to the JSON property `varTableIndex`
# @return [Fixnum]
attr_accessor :var_table_index
# Simple value of the variable.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
# Members contained or pointed to by the variable.
# Corresponds to the JSON property `members`
# @return [Array<Google::Apis::ClouddebuggerV2::Variable>]
@ -312,18 +197,30 @@ module Google
# @return [String]
attr_accessor :type
# Reference to a variable in the shared variable table. More than
# one variable can reference the same variable in the table. The
# `var_table_index` field is an index into `variable_table` in Breakpoint.
# Corresponds to the JSON property `varTableIndex`
# @return [Fixnum]
attr_accessor :var_table_index
# Simple value of the variable.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@var_table_index = args[:var_table_index] if args.key?(:var_table_index)
@value = args[:value] if args.key?(:value)
@members = args[:members] if args.key?(:members)
@status = args[:status] if args.key?(:status)
@name = args[:name] if args.key?(:name)
@type = args[:type] if args.key?(:type)
@var_table_index = args[:var_table_index] if args.key?(:var_table_index)
@value = args[:value] if args.key?(:value)
end
end
@ -370,25 +267,25 @@ module Google
class RepoId
include Google::Apis::Core::Hashable
# A server-assigned, globally unique identifier.
# Corresponds to the JSON property `uid`
# @return [String]
attr_accessor :uid
# Selects a repo using a Google Cloud Platform project ID
# (e.g. winged-cargo-31) and a repo name within that project.
# Corresponds to the JSON property `projectRepoId`
# @return [Google::Apis::ClouddebuggerV2::ProjectRepoId]
attr_accessor :project_repo_id
# A server-assigned, globally unique identifier.
# Corresponds to the JSON property `uid`
# @return [String]
attr_accessor :uid
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id)
@uid = args[:uid] if args.key?(:uid)
@project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id)
end
end
@ -450,6 +347,29 @@ module Google
end
end
# Response for listing debuggees.
class ListDebuggeesResponse
include Google::Apis::Core::Hashable
# List of debuggees accessible to the calling user.
# Note that the `description` field is the only human readable field
# that should be displayed to the user.
# The fields `debuggee.id` and `description` fields are guaranteed to be
# set on each debuggee.
# Corresponds to the JSON property `debuggees`
# @return [Array<Google::Apis::ClouddebuggerV2::Debuggee>]
attr_accessor :debuggees
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@debuggees = args[:debuggees] if args.key?(:debuggees)
end
end
# An alias to a repo revision.
class AliasContext
include Google::Apis::Core::Hashable
@ -475,29 +395,6 @@ module Google
end
end
# Response for listing debuggees.
class ListDebuggeesResponse
include Google::Apis::Core::Hashable
# List of debuggees accessible to the calling user.
# Note that the `description` field is the only human readable field
# that should be displayed to the user.
# The fields `debuggee.id` and `description` fields are guaranteed to be
# set on each debuggee.
# Corresponds to the JSON property `debuggees`
# @return [Array<Google::Apis::ClouddebuggerV2::Debuggee>]
attr_accessor :debuggees
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@debuggees = args[:debuggees] if args.key?(:debuggees)
end
end
# A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
@ -550,54 +447,6 @@ module Google
class Debuggee
include Google::Apis::Core::Hashable
# Project the debuggee is associated with.
# Use the project number when registering a Google Cloud Platform project.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# Unique identifier for the debuggee generated by the controller service.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Version ID of the agent release. The version ID is structured as
# following: `domain/type/vmajor.minor` (for example
# `google.com/gcp-java/v1.1`).
# Corresponds to the JSON property `agentVersion`
# @return [String]
attr_accessor :agent_version
# If set to `true`, indicates that the agent should disable itself and
# detach from the debuggee.
# Corresponds to the JSON property `isDisabled`
# @return [Boolean]
attr_accessor :is_disabled
alias_method :is_disabled?, :is_disabled
# Human readable description of the debuggee.
# Including a human-readable project name, environment name and version
# information is recommended.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Debuggee uniquifier within the project.
# Any string that identifies the application within the project can be used.
# Including environment and version or build IDs is recommended.
# Corresponds to the JSON property `uniquifier`
# @return [String]
attr_accessor :uniquifier
# References to the locations and revisions of the source code used in the
# deployed application.
# NOTE: This field is deprecated. Consumers should use
# `ext_source_contexts` if it is not empty. Debug agents should populate
# both this field and `ext_source_contexts`.
# Corresponds to the JSON property `sourceContexts`
# @return [Array<Google::Apis::ClouddebuggerV2::SourceContext>]
attr_accessor :source_contexts
# References to the locations and revisions of the source code used in the
# deployed application.
# Contexts describing a remote repo related to the source code
@ -613,6 +462,13 @@ module Google
# @return [Hash<String,String>]
attr_accessor :labels
# If set to `true`, indicates that the debuggee is considered as inactive by
# the Controller service.
# Corresponds to the JSON property `isInactive`
# @return [Boolean]
attr_accessor :is_inactive
alias_method :is_inactive?, :is_inactive
# Represents a contextual status message.
# The message can indicate an error or informational status, and refer to
# specific parts of the containing object.
@ -622,12 +478,53 @@ module Google
# @return [Google::Apis::ClouddebuggerV2::StatusMessage]
attr_accessor :status
# If set to `true`, indicates that the debuggee is considered as inactive by
# the Controller service.
# Corresponds to the JSON property `isInactive`
# Project the debuggee is associated with.
# Use the project number when registering a Google Cloud Platform project.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# If set to `true`, indicates that the agent should disable itself and
# detach from the debuggee.
# Corresponds to the JSON property `isDisabled`
# @return [Boolean]
attr_accessor :is_inactive
alias_method :is_inactive?, :is_inactive
attr_accessor :is_disabled
alias_method :is_disabled?, :is_disabled
# Version ID of the agent release. The version ID is structured as
# following: `domain/type/vmajor.minor` (for example
# `google.com/gcp-java/v1.1`).
# Corresponds to the JSON property `agentVersion`
# @return [String]
attr_accessor :agent_version
# Unique identifier for the debuggee generated by the controller service.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Debuggee uniquifier within the project.
# Any string that identifies the application within the project can be used.
# Including environment and version or build IDs is recommended.
# Corresponds to the JSON property `uniquifier`
# @return [String]
attr_accessor :uniquifier
# Human readable description of the debuggee.
# Including a human-readable project name, environment name and version
# information is recommended.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# References to the locations and revisions of the source code used in the
# deployed application.
# NOTE: This field is deprecated. Consumers should use
# `ext_source_contexts` if it is not empty. Debug agents should populate
# both this field and `ext_source_contexts`.
# Corresponds to the JSON property `sourceContexts`
# @return [Array<Google::Apis::ClouddebuggerV2::SourceContext>]
attr_accessor :source_contexts
def initialize(**args)
update!(**args)
@ -635,17 +532,52 @@ module Google
# Update properties of this object
def update!(**args)
@project = args[:project] if args.key?(:project)
@id = args[:id] if args.key?(:id)
@agent_version = args[:agent_version] if args.key?(:agent_version)
@is_disabled = args[:is_disabled] if args.key?(:is_disabled)
@description = args[:description] if args.key?(:description)
@uniquifier = args[:uniquifier] if args.key?(:uniquifier)
@source_contexts = args[:source_contexts] if args.key?(:source_contexts)
@ext_source_contexts = args[:ext_source_contexts] if args.key?(:ext_source_contexts)
@labels = args[:labels] if args.key?(:labels)
@status = args[:status] if args.key?(:status)
@is_inactive = args[:is_inactive] if args.key?(:is_inactive)
@status = args[:status] if args.key?(:status)
@project = args[:project] if args.key?(:project)
@is_disabled = args[:is_disabled] if args.key?(:is_disabled)
@agent_version = args[:agent_version] if args.key?(:agent_version)
@id = args[:id] if args.key?(:id)
@uniquifier = args[:uniquifier] if args.key?(:uniquifier)
@description = args[:description] if args.key?(:description)
@source_contexts = args[:source_contexts] if args.key?(:source_contexts)
end
end
# Response for listing active breakpoints.
class ListActiveBreakpointsResponse
include Google::Apis::Core::Hashable
# List of all active breakpoints.
# The fields `id` and `location` are guaranteed to be set on each breakpoint.
# Corresponds to the JSON property `breakpoints`
# @return [Array<Google::Apis::ClouddebuggerV2::Breakpoint>]
attr_accessor :breakpoints
# The `wait_expired` field is set to true by the server when the
# request times out and the field `success_on_timeout` is set to true.
# Corresponds to the JSON property `waitExpired`
# @return [Boolean]
attr_accessor :wait_expired
alias_method :wait_expired?, :wait_expired
# A wait token that can be used in the next method call to block until
# the list of breakpoints changes.
# Corresponds to the JSON property `nextWaitToken`
# @return [String]
attr_accessor :next_wait_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@breakpoints = args[:breakpoints] if args.key?(:breakpoints)
@wait_expired = args[:wait_expired] if args.key?(:wait_expired)
@next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token)
end
end
@ -675,41 +607,6 @@ module Google
end
end
# Response for listing active breakpoints.
class ListActiveBreakpointsResponse
include Google::Apis::Core::Hashable
# A wait token that can be used in the next method call to block until
# the list of breakpoints changes.
# Corresponds to the JSON property `nextWaitToken`
# @return [String]
attr_accessor :next_wait_token
# List of all active breakpoints.
# The fields `id` and `location` are guaranteed to be set on each breakpoint.
# Corresponds to the JSON property `breakpoints`
# @return [Array<Google::Apis::ClouddebuggerV2::Breakpoint>]
attr_accessor :breakpoints
# The `wait_expired` field is set to true by the server when the
# request times out and the field `success_on_timeout` is set to true.
# Corresponds to the JSON property `waitExpired`
# @return [Boolean]
attr_accessor :wait_expired
alias_method :wait_expired?, :wait_expired
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token)
@breakpoints = args[:breakpoints] if args.key?(:breakpoints)
@wait_expired = args[:wait_expired] if args.key?(:wait_expired)
end
end
# A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.
class CloudWorkspaceSourceContext
include Google::Apis::Core::Hashable
@ -829,6 +726,12 @@ module Google
class ListBreakpointsResponse
include Google::Apis::Core::Hashable
# A wait token that can be used in the next call to `list` (REST) or
# `ListBreakpoints` (RPC) to block until the list of breakpoints has changes.
# Corresponds to the JSON property `nextWaitToken`
# @return [String]
attr_accessor :next_wait_token
# List of breakpoints matching the request.
# The fields `id` and `location` are guaranteed to be set on each breakpoint.
# The fields: `stack_frames`, `evaluated_expressions` and `variable_table`
@ -837,20 +740,14 @@ module Google
# @return [Array<Google::Apis::ClouddebuggerV2::Breakpoint>]
attr_accessor :breakpoints
# A wait token that can be used in the next call to `list` (REST) or
# `ListBreakpoints` (RPC) to block until the list of breakpoints has changes.
# Corresponds to the JSON property `nextWaitToken`
# @return [String]
attr_accessor :next_wait_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@breakpoints = args[:breakpoints] if args.key?(:breakpoints)
@next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token)
@breakpoints = args[:breakpoints] if args.key?(:breakpoints)
end
end
@ -858,6 +755,59 @@ module Google
class Breakpoint
include Google::Apis::Core::Hashable
# Breakpoint identifier, unique in the scope of the debuggee.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Represents a location in the source code.
# Corresponds to the JSON property `location`
# @return [Google::Apis::ClouddebuggerV2::SourceLocation]
attr_accessor :location
# Time this breakpoint was finalized as seen by the server in seconds
# resolution.
# Corresponds to the JSON property `finalTime`
# @return [String]
attr_accessor :final_time
# The `variable_table` exists to aid with computation, memory and network
# traffic optimization. It enables storing a variable once and reference
# it from multiple variables, including variables stored in the
# `variable_table` itself.
# For example, the same `this` object, which may appear at many levels of
# the stack, can have all of its data stored once in this table. The
# stack frame variables then would hold only a reference to it.
# The variable `var_table_index` field is an index into this repeated field.
# The stored objects are nameless and get their name from the referencing
# variable. The effective variable is a merge of the referencing variable
# and the referenced variable.
# Corresponds to the JSON property `variableTable`
# @return [Array<Google::Apis::ClouddebuggerV2::Variable>]
attr_accessor :variable_table
# A set of custom breakpoint properties, populated by the agent, to be
# displayed to the user.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Only relevant when action is `LOG`. Defines the message to log when
# the breakpoint hits. The message may include parameter placeholders `$0`,
# `$1`, etc. These placeholders are replaced with the evaluated value
# of the appropriate expression. Expressions not referenced in
# `log_message_format` are not logged.
# Example: `Message received, id = $0, count = $1` with
# `expressions` = `[ message.id, message.count ]`.
# Corresponds to the JSON property `logMessageFormat`
# @return [String]
attr_accessor :log_message_format
# Time this breakpoint was created by the server in seconds resolution.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# List of read-only expressions to evaluate at the breakpoint location.
# The expressions are composed using expressions in the programming language
# at the source location. If the breakpoint action is `LOG`, the evaluated
@ -921,65 +871,19 @@ module Google
# @return [String]
attr_accessor :log_level
# Breakpoint identifier, unique in the scope of the debuggee.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Represents a location in the source code.
# Corresponds to the JSON property `location`
# @return [Google::Apis::ClouddebuggerV2::SourceLocation]
attr_accessor :location
# Time this breakpoint was finalized as seen by the server in seconds
# resolution.
# Corresponds to the JSON property `finalTime`
# @return [String]
attr_accessor :final_time
# The `variable_table` exists to aid with computation, memory and network
# traffic optimization. It enables storing a variable once and reference
# it from multiple variables, including variables stored in the
# `variable_table` itself.
# For example, the same `this` object, which may appear at many levels of
# the stack, can have all of its data stored once in this table. The
# stack frame variables then would hold only a reference to it.
# The variable `var_table_index` field is an index into this repeated field.
# The stored objects are nameless and get their name from the referencing
# variable. The effective variable is a merge of the referencing variable
# and the referenced variable.
# Corresponds to the JSON property `variableTable`
# @return [Array<Google::Apis::ClouddebuggerV2::Variable>]
attr_accessor :variable_table
# A set of custom breakpoint properties, populated by the agent, to be
# displayed to the user.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Time this breakpoint was created by the server in seconds resolution.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Only relevant when action is `LOG`. Defines the message to log when
# the breakpoint hits. The message may include parameter placeholders `$0`,
# `$1`, etc. These placeholders are replaced with the evaluated value
# of the appropriate expression. Expressions not referenced in
# `log_message_format` are not logged.
# Example: `Message received, id = $0, count = $1` with
# `expressions` = `[ message.id, message.count ]`.
# Corresponds to the JSON property `logMessageFormat`
# @return [String]
attr_accessor :log_message_format
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@location = args[:location] if args.key?(:location)
@final_time = args[:final_time] if args.key?(:final_time)
@variable_table = args[:variable_table] if args.key?(:variable_table)
@labels = args[:labels] if args.key?(:labels)
@log_message_format = args[:log_message_format] if args.key?(:log_message_format)
@create_time = args[:create_time] if args.key?(:create_time)
@expressions = args[:expressions] if args.key?(:expressions)
@evaluated_expressions = args[:evaluated_expressions] if args.key?(:evaluated_expressions)
@is_final_state = args[:is_final_state] if args.key?(:is_final_state)
@ -989,32 +893,6 @@ module Google
@user_email = args[:user_email] if args.key?(:user_email)
@action = args[:action] if args.key?(:action)
@log_level = args[:log_level] if args.key?(:log_level)
@id = args[:id] if args.key?(:id)
@location = args[:location] if args.key?(:location)
@final_time = args[:final_time] if args.key?(:final_time)
@variable_table = args[:variable_table] if args.key?(:variable_table)
@labels = args[:labels] if args.key?(:labels)
@create_time = args[:create_time] if args.key?(:create_time)
@log_message_format = args[:log_message_format] if args.key?(:log_message_format)
end
end
# Response for setting a breakpoint.
class SetBreakpointResponse
include Google::Apis::Core::Hashable
# Represents the breakpoint specification, status and results.
# Corresponds to the JSON property `breakpoint`
# @return [Google::Apis::ClouddebuggerV2::Breakpoint]
attr_accessor :breakpoint
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@breakpoint = args[:breakpoint] if args.key?(:breakpoint)
end
end
@ -1037,17 +915,30 @@ module Google
end
end
# Response for setting a breakpoint.
class SetBreakpointResponse
include Google::Apis::Core::Hashable
# Represents the breakpoint specification, status and results.
# Corresponds to the JSON property `breakpoint`
# @return [Google::Apis::ClouddebuggerV2::Breakpoint]
attr_accessor :breakpoint
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@breakpoint = args[:breakpoint] if args.key?(:breakpoint)
end
end
# A SourceContext is a reference to a tree of files. A SourceContext together
# with a path point to a unique revision of a single file or directory.
class SourceContext
include Google::Apis::Core::Hashable
# A GitSourceContext denotes a particular revision in a third party Git
# repository (e.g. GitHub).
# Corresponds to the JSON property `git`
# @return [Google::Apis::ClouddebuggerV2::GitSourceContext]
attr_accessor :git
# A SourceContext referring to a Gerrit project.
# Corresponds to the JSON property `gerrit`
# @return [Google::Apis::ClouddebuggerV2::GerritSourceContext]
@ -1064,16 +955,125 @@ module Google
# @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext]
attr_accessor :cloud_workspace
# A GitSourceContext denotes a particular revision in a third party Git
# repository (e.g. GitHub).
# Corresponds to the JSON property `git`
# @return [Google::Apis::ClouddebuggerV2::GitSourceContext]
attr_accessor :git
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@git = args[:git] if args.key?(:git)
@gerrit = args[:gerrit] if args.key?(:gerrit)
@cloud_repo = args[:cloud_repo] if args.key?(:cloud_repo)
@cloud_workspace = args[:cloud_workspace] if args.key?(:cloud_workspace)
@git = args[:git] if args.key?(:git)
end
end
# A CloudRepoSourceContext denotes a particular revision in a cloud
# repo (a repo hosted by the Google Cloud Platform).
class CloudRepoSourceContext
include Google::Apis::Core::Hashable
# A revision ID.
# Corresponds to the JSON property `revisionId`
# @return [String]
attr_accessor :revision_id
# The name of an alias (branch, tag, etc.).
# Corresponds to the JSON property `aliasName`
# @return [String]
attr_accessor :alias_name
# A unique identifier for a cloud repo.
# Corresponds to the JSON property `repoId`
# @return [Google::Apis::ClouddebuggerV2::RepoId]
attr_accessor :repo_id
# An alias to a repo revision.
# Corresponds to the JSON property `aliasContext`
# @return [Google::Apis::ClouddebuggerV2::AliasContext]
attr_accessor :alias_context
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@revision_id = args[:revision_id] if args.key?(:revision_id)
@alias_name = args[:alias_name] if args.key?(:alias_name)
@repo_id = args[:repo_id] if args.key?(:repo_id)
@alias_context = args[:alias_context] if args.key?(:alias_context)
end
end
# Response for registering a debuggee.
class RegisterDebuggeeResponse
include Google::Apis::Core::Hashable
# Represents the application to debug. The application may include one or more
# replicated processes executing the same code. Each of these processes is
# attached with a debugger agent, carrying out the debugging commands.
# The agents attached to the same debuggee are identified by using exactly the
# same field values when registering.
# Corresponds to the JSON property `debuggee`
# @return [Google::Apis::ClouddebuggerV2::Debuggee]
attr_accessor :debuggee
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@debuggee = args[:debuggee] if args.key?(:debuggee)
end
end
# Request to register a debuggee.
class RegisterDebuggeeRequest
include Google::Apis::Core::Hashable
# Represents the application to debug. The application may include one or more
# replicated processes executing the same code. Each of these processes is
# attached with a debugger agent, carrying out the debugging commands.
# The agents attached to the same debuggee are identified by using exactly the
# same field values when registering.
# Corresponds to the JSON property `debuggee`
# @return [Google::Apis::ClouddebuggerV2::Debuggee]
attr_accessor :debuggee
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@debuggee = args[:debuggee] if args.key?(:debuggee)
end
end
# Response for getting breakpoint information.
class GetBreakpointResponse
include Google::Apis::Core::Hashable
# Represents the breakpoint specification, status and results.
# Corresponds to the JSON property `breakpoint`
# @return [Google::Apis::ClouddebuggerV2::Breakpoint]
attr_accessor :breakpoint
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@breakpoint = args[:breakpoint] if args.key?(:breakpoint)
end
end
end

View File

@ -22,30 +22,6 @@ module Google
module Apis
module ClouddebuggerV2
class CloudRepoSourceContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RegisterDebuggeeRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RegisterDebuggeeResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetBreakpointResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StatusMessage
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -88,13 +64,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AliasContext
class ListDebuggeesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListDebuggeesResponse
class AliasContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -118,13 +94,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ProjectRepoId
class ListActiveBreakpointsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListActiveBreakpointsResponse
class ProjectRepoId
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -166,13 +142,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SetBreakpointResponse
class UpdateActiveBreakpointRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UpdateActiveBreakpointRequest
class SetBreakpointResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -185,39 +161,27 @@ module Google
end
class CloudRepoSourceContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :revision_id, as: 'revisionId'
property :alias_name, as: 'aliasName'
property :repo_id, as: 'repoId', class: Google::Apis::ClouddebuggerV2::RepoId, decorator: Google::Apis::ClouddebuggerV2::RepoId::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation
end
end
class RegisterDebuggeeRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :debuggee, as: 'debuggee', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation
end
include Google::Apis::Core::JsonObjectSupport
end
class RegisterDebuggeeResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :debuggee, as: 'debuggee', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
include Google::Apis::Core::JsonObjectSupport
end
class RegisterDebuggeeRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetBreakpointResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
include Google::Apis::Core::JsonObjectSupport
end
class StatusMessage
@ -241,14 +205,14 @@ module Google
class Variable
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :var_table_index, as: 'varTableIndex'
property :value, as: 'value'
collection :members, as: 'members', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation
property :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation
property :name, as: 'name'
property :type, as: 'type'
property :var_table_index, as: 'varTableIndex'
property :value, as: 'value'
end
end
@ -268,9 +232,9 @@ module Google
class RepoId
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :uid, as: 'uid'
property :project_repo_id, as: 'projectRepoId', class: Google::Apis::ClouddebuggerV2::ProjectRepoId, decorator: Google::Apis::ClouddebuggerV2::ProjectRepoId::Representation
property :uid, as: 'uid'
end
end
@ -291,14 +255,6 @@ module Google
end
end
class AliasContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :kind, as: 'kind'
end
end
class ListDebuggeesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -307,6 +263,14 @@ module Google
end
end
class AliasContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :kind, as: 'kind'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -324,20 +288,30 @@ module Google
class Debuggee
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :project, as: 'project'
property :id, as: 'id'
property :agent_version, as: 'agentVersion'
property :is_disabled, as: 'isDisabled'
property :description, as: 'description'
property :uniquifier, as: 'uniquifier'
collection :source_contexts, as: 'sourceContexts', class: Google::Apis::ClouddebuggerV2::SourceContext, decorator: Google::Apis::ClouddebuggerV2::SourceContext::Representation
collection :ext_source_contexts, as: 'extSourceContexts', class: Google::Apis::ClouddebuggerV2::ExtendedSourceContext, decorator: Google::Apis::ClouddebuggerV2::ExtendedSourceContext::Representation
hash :labels, as: 'labels'
property :is_inactive, as: 'isInactive'
property :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation
property :is_inactive, as: 'isInactive'
property :project, as: 'project'
property :is_disabled, as: 'isDisabled'
property :agent_version, as: 'agentVersion'
property :id, as: 'id'
property :uniquifier, as: 'uniquifier'
property :description, as: 'description'
collection :source_contexts, as: 'sourceContexts', class: Google::Apis::ClouddebuggerV2::SourceContext, decorator: Google::Apis::ClouddebuggerV2::SourceContext::Representation
end
end
class ListActiveBreakpointsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
property :wait_expired, as: 'waitExpired'
property :next_wait_token, as: 'nextWaitToken'
end
end
@ -349,16 +323,6 @@ module Google
end
end
class ListActiveBreakpointsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_wait_token, as: 'nextWaitToken'
collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
property :wait_expired, as: 'waitExpired'
end
end
class CloudWorkspaceSourceContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -398,15 +362,24 @@ module Google
class ListBreakpointsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_wait_token, as: 'nextWaitToken'
collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
property :next_wait_token, as: 'nextWaitToken'
end
end
class Breakpoint
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation
property :final_time, as: 'finalTime'
collection :variable_table, as: 'variableTable', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation
hash :labels, as: 'labels'
property :log_message_format, as: 'logMessageFormat'
property :create_time, as: 'createTime'
collection :expressions, as: 'expressions'
collection :evaluated_expressions, as: 'evaluatedExpressions', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation
@ -419,23 +392,6 @@ module Google
property :user_email, as: 'userEmail'
property :action, as: 'action'
property :log_level, as: 'logLevel'
property :id, as: 'id'
property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation
property :final_time, as: 'finalTime'
collection :variable_table, as: 'variableTable', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation
hash :labels, as: 'labels'
property :create_time, as: 'createTime'
property :log_message_format, as: 'logMessageFormat'
end
end
class SetBreakpointResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
end
end
@ -447,17 +403,61 @@ module Google
end
end
class SetBreakpointResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
end
end
class SourceContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :git, as: 'git', class: Google::Apis::ClouddebuggerV2::GitSourceContext, decorator: Google::Apis::ClouddebuggerV2::GitSourceContext::Representation
property :gerrit, as: 'gerrit', class: Google::Apis::ClouddebuggerV2::GerritSourceContext, decorator: Google::Apis::ClouddebuggerV2::GerritSourceContext::Representation
property :cloud_repo, as: 'cloudRepo', class: Google::Apis::ClouddebuggerV2::CloudRepoSourceContext, decorator: Google::Apis::ClouddebuggerV2::CloudRepoSourceContext::Representation
property :cloud_workspace, as: 'cloudWorkspace', class: Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext, decorator: Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext::Representation
property :git, as: 'git', class: Google::Apis::ClouddebuggerV2::GitSourceContext, decorator: Google::Apis::ClouddebuggerV2::GitSourceContext::Representation
end
end
class CloudRepoSourceContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :revision_id, as: 'revisionId'
property :alias_name, as: 'aliasName'
property :repo_id, as: 'repoId', class: Google::Apis::ClouddebuggerV2::RepoId, decorator: Google::Apis::ClouddebuggerV2::RepoId::Representation
property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation
end
end
class RegisterDebuggeeResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :debuggee, as: 'debuggee', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation
end
end
class RegisterDebuggeeRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :debuggee, as: 'debuggee', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation
end
end
class GetBreakpointResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
end
end
end

View File

@ -48,19 +48,19 @@ module Google
end
# Lists all the debuggees that the user can set breakpoints to.
# @param [String] client_version
# The client version making the call.
# Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
# @param [Boolean] include_inactive
# When set to `true`, the result includes all debuggees. Otherwise, the
# result includes only debuggees that are active.
# @param [String] project
# Project number of a Google Cloud project whose debuggees to list.
# @param [String] client_version
# The client version making the call.
# Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -73,15 +73,15 @@ 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 list_debugger_debuggees(client_version: nil, include_inactive: nil, project: nil, quota_user: nil, fields: nil, options: nil, &block)
def list_debugger_debuggees(include_inactive: nil, project: nil, client_version: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/debugger/debuggees', options)
command.response_representation = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse::Representation
command.response_class = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse
command.query['clientVersion'] = client_version unless client_version.nil?
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
command.query['project'] = project unless project.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['clientVersion'] = client_version unless client_version.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -92,11 +92,11 @@ module Google
# @param [String] client_version
# The client version making the call.
# Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -109,7 +109,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 set_debugger_debuggee_breakpoint(debuggee_id, breakpoint_object = nil, client_version: nil, quota_user: nil, fields: nil, options: nil, &block)
def set_debugger_debuggee_breakpoint(debuggee_id, breakpoint_object = nil, client_version: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/set', options)
command.request_representation = Google::Apis::ClouddebuggerV2::Breakpoint::Representation
command.request_object = breakpoint_object
@ -117,8 +117,8 @@ module Google
command.response_class = Google::Apis::ClouddebuggerV2::SetBreakpointResponse
command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil?
command.query['clientVersion'] = client_version unless client_version.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -130,11 +130,11 @@ module Google
# @param [String] client_version
# The client version making the call.
# Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -147,15 +147,15 @@ 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 delete_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id, client_version: nil, quota_user: nil, fields: nil, options: nil, &block)
def delete_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id, client_version: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}', options)
command.response_representation = Google::Apis::ClouddebuggerV2::Empty::Representation
command.response_class = Google::Apis::ClouddebuggerV2::Empty
command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil?
command.params['breakpointId'] = breakpoint_id unless breakpoint_id.nil?
command.query['clientVersion'] = client_version unless client_version.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -167,11 +167,11 @@ module Google
# @param [String] client_version
# The client version making the call.
# Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -184,15 +184,15 @@ 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 get_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id, client_version: nil, quota_user: nil, fields: nil, options: nil, &block)
def get_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id, client_version: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}', options)
command.response_representation = Google::Apis::ClouddebuggerV2::GetBreakpointResponse::Representation
command.response_class = Google::Apis::ClouddebuggerV2::GetBreakpointResponse
command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil?
command.params['breakpointId'] = breakpoint_id unless breakpoint_id.nil?
command.query['clientVersion'] = client_version unless client_version.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -219,11 +219,11 @@ module Google
# Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
# @param [String] action_value
# Only breakpoints with the specified action will pass the filter.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -236,7 +236,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 list_debugger_debuggee_breakpoints(debuggee_id, include_inactive: nil, include_all_users: nil, strip_results: nil, wait_token: nil, client_version: nil, action_value: nil, quota_user: nil, fields: nil, options: nil, &block)
def list_debugger_debuggee_breakpoints(debuggee_id, include_inactive: nil, include_all_users: nil, strip_results: nil, wait_token: nil, client_version: nil, action_value: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/debugger/debuggees/{debuggeeId}/breakpoints', options)
command.response_representation = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse::Representation
command.response_class = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse
@ -247,8 +247,8 @@ module Google
command.query['waitToken'] = wait_token unless wait_token.nil?
command.query['clientVersion'] = client_version unless client_version.nil?
command.query['action.value'] = action_value unless action_value.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -261,11 +261,11 @@ module Google
# data loss. If the debuggee is disabled by the server, the response will
# have `is_disabled` set to `true`.
# @param [Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest] register_debuggee_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -278,14 +278,14 @@ 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 register_debuggee(register_debuggee_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def register_debuggee(register_debuggee_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v2/controller/debuggees/register', options)
command.request_representation = Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest::Representation
command.request_object = register_debuggee_request_object
command.response_representation = Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse::Representation
command.response_class = Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -302,21 +302,21 @@ module Google
# setting those breakpoints again.
# @param [String] debuggee_id
# Identifies the debuggee.
# @param [String] wait_token
# A wait token that, if specified, blocks the method call until the list
# of active breakpoints has changed, or a server selected timeout has
# expired. The value should be set from the last returned response.
# @param [Boolean] success_on_timeout
# If set to `true`, returns `google.rpc.Code.OK` status and sets the
# `wait_expired` response field to `true` when the server-selected timeout
# has expired (recommended).
# If set to `false`, returns `google.rpc.Code.ABORTED` status when the
# server-selected timeout has expired (deprecated).
# @param [String] wait_token
# A wait token that, if specified, blocks the method call until the list
# of active breakpoints has changed, or a server selected timeout has
# expired. The value should be set from the last returned response.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -329,15 +329,15 @@ 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 list_controller_debuggee_breakpoints(debuggee_id, success_on_timeout: nil, wait_token: nil, quota_user: nil, fields: nil, options: nil, &block)
def list_controller_debuggee_breakpoints(debuggee_id, wait_token: nil, success_on_timeout: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/controller/debuggees/{debuggeeId}/breakpoints', options)
command.response_representation = Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse::Representation
command.response_class = Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse
command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil?
command.query['successOnTimeout'] = success_on_timeout unless success_on_timeout.nil?
command.query['waitToken'] = wait_token unless wait_token.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['successOnTimeout'] = success_on_timeout unless success_on_timeout.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -354,11 +354,11 @@ module Google
# @param [String] id
# Breakpoint identifier, unique in the scope of the debuggee.
# @param [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest] update_active_breakpoint_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -371,7 +371,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 update_active_breakpoint(debuggee_id, id, update_active_breakpoint_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def update_active_breakpoint(debuggee_id, id, update_active_breakpoint_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v2/controller/debuggees/{debuggeeId}/breakpoints/{id}', options)
command.request_representation = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest::Representation
command.request_object = update_active_breakpoint_request_object
@ -379,8 +379,8 @@ module Google
command.response_class = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse
command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil?
command.params['id'] = id unless id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end

View File

@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/kms/
module CloudkmsV1beta1
VERSION = 'V1beta1'
REVISION = '20170124'
REVISION = '20170208'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -22,325 +22,6 @@ module Google
module Apis
module CloudkmsV1beta1
# Specifies what kind of log the caller must write
# Increment a streamz counter with the specified metric and field names.
# Metric names should start with a '/', generally be lowercase-only,
# and end in "_count". Field names should not contain an initial slash.
# The actual exported metric names will have "/iam/policy" prepended.
# Field names correspond to IAM request parameters and field values are
# their respective values.
# At present the only supported field names are
# - "iam_principal", corresponding to IAMContext.principal;
# - "" (empty string), resulting in one aggretated counter with no field.
# Examples:
# counter ` metric: "/debug_access_count" field: "iam_principal" `
# ==> increment counter /iam/policy/backend_debug_access_count
# `iam_principal=[value of IAMContext.principal]`
# At this time we do not support:
# * multiple field names (though this may be supported in the future)
# * decrementing the counter
# * incrementing it by anything other than 1
class LogConfig
include Google::Apis::Core::Hashable
# Write a Data Access (Gin) log
# Corresponds to the JSON property `dataAccess`
# @return [Google::Apis::CloudkmsV1beta1::DataAccessOptions]
attr_accessor :data_access
# Write a Cloud Audit log
# Corresponds to the JSON property `cloudAudit`
# @return [Google::Apis::CloudkmsV1beta1::CloudAuditOptions]
attr_accessor :cloud_audit
# Options for counters
# Corresponds to the JSON property `counter`
# @return [Google::Apis::CloudkmsV1beta1::CounterOptions]
attr_accessor :counter
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@data_access = args[:data_access] if args.key?(:data_access)
@cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit)
@counter = args[:counter] if args.key?(:counter)
end
end
# Request message for `SetIamPolicy` method.
class SetIamPolicyRequest
include Google::Apis::Core::Hashable
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
# the fields in the mask will be modified. If no mask is provided, a default
# mask is used:
# paths: "bindings, etag"
# This field is only used by Cloud IAM.
# Corresponds to the JSON property `updateMask`
# @return [String]
attr_accessor :update_mask
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
# **Example**
# `
# "bindings": [
# `
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# `,
# `
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# `
# ]
# `
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::CloudkmsV1beta1::Policy]
attr_accessor :policy
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@update_mask = args[:update_mask] if args.key?(:update_mask)
@policy = args[:policy] if args.key?(:policy)
end
end
# Request message for KeyManagementService.Decrypt.
class DecryptRequest
include Google::Apis::Core::Hashable
# Required. The encrypted data originally returned in
# EncryptResponse.ciphertext.
# Corresponds to the JSON property `ciphertext`
# @return [String]
attr_accessor :ciphertext
# Optional data that must match the data originally supplied in
# EncryptRequest.additional_authenticated_data.
# Corresponds to the JSON property `additionalAuthenticatedData`
# @return [String]
attr_accessor :additional_authenticated_data
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ciphertext = args[:ciphertext] if args.key?(:ciphertext)
@additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data)
end
end
# A resource that represents Google Cloud Platform location.
class Location
include Google::Apis::Core::Hashable
# The canonical id for this location. For example: `"us-east1"`.
# Corresponds to the JSON property `locationId`
# @return [String]
attr_accessor :location_id
# Service-specific metadata. For example the available capacity at the given
# location.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# Cross-service attributes for the location. For example
# `"cloud.googleapis.com/region": "us-east1"`
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Resource name for the location, which may vary between implementations.
# For example: `"projects/example-project/locations/us-east1"`
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@location_id = args[:location_id] if args.key?(:location_id)
@metadata = args[:metadata] if args.key?(:metadata)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
end
end
# Response message for KeyManagementService.ListCryptoKeys.
class ListCryptoKeysResponse
include Google::Apis::Core::Hashable
# A token to retrieve next page of results. Pass this value in
# ListCryptoKeysRequest.page_token to retrieve the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The list of CryptoKeys.
# Corresponds to the JSON property `cryptoKeys`
# @return [Array<Google::Apis::CloudkmsV1beta1::CryptoKey>]
attr_accessor :crypto_keys
# The total number of CryptoKeys that matched the query.
# Corresponds to the JSON property `totalSize`
# @return [Fixnum]
attr_accessor :total_size
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@crypto_keys = args[:crypto_keys] if args.key?(:crypto_keys)
@total_size = args[:total_size] if args.key?(:total_size)
end
end
# A condition to be met.
class Condition
include Google::Apis::Core::Hashable
# DEPRECATED. Use 'values' instead.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
# Trusted attributes supplied by any service that owns resources and uses
# the IAM system for access control.
# Corresponds to the JSON property `sys`
# @return [String]
attr_accessor :sys
# The objects of the condition. This is mutually exclusive with 'value'.
# Corresponds to the JSON property `values`
# @return [Array<String>]
attr_accessor :values
# Trusted attributes supplied by the IAM system.
# Corresponds to the JSON property `iam`
# @return [String]
attr_accessor :iam
# An operator to apply the subject with.
# Corresponds to the JSON property `op`
# @return [String]
attr_accessor :op
# Trusted attributes discharged by the service.
# Corresponds to the JSON property `svc`
# @return [String]
attr_accessor :svc
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@value = args[:value] if args.key?(:value)
@sys = args[:sys] if args.key?(:sys)
@values = args[:values] if args.key?(:values)
@iam = args[:iam] if args.key?(:iam)
@op = args[:op] if args.key?(:op)
@svc = args[:svc] if args.key?(:svc)
end
end
# Options for counters
class CounterOptions
include Google::Apis::Core::Hashable
# The metric to update.
# Corresponds to the JSON property `metric`
# @return [String]
attr_accessor :metric
# The field value to attribute.
# Corresponds to the JSON property `field`
# @return [String]
attr_accessor :field
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metric = args[:metric] if args.key?(:metric)
@field = args[:field] if args.key?(:field)
end
end
# Provides the configuration for logging a type of permissions.
# Example:
# `
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# "exempted_members": [
# "user:foo@gmail.com"
# ]
# `,
# `
# "log_type": "DATA_WRITE",
# `
# ]
# `
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
# foo@gmail.com from DATA_READ logging.
class AuditLogConfig
include Google::Apis::Core::Hashable
# Specifies the identities that do not cause logging for this type of
# permission.
# Follows the same format of Binding.members.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
# The log type that this config enables.
# Corresponds to the JSON property `logType`
# @return [String]
attr_accessor :log_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@log_type = args[:log_type] if args.key?(:log_type)
end
end
# Response message for KeyManagementService.Decrypt.
class DecryptResponse
include Google::Apis::Core::Hashable
@ -382,31 +63,6 @@ module Google
end
end
# The response message for Locations.ListLocations.
class ListLocationsResponse
include Google::Apis::Core::Hashable
# The standard List next-page token.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# A list of locations that matches the specified filter in the request.
# Corresponds to the JSON property `locations`
# @return [Array<Google::Apis::CloudkmsV1beta1::Location>]
attr_accessor :locations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@locations = args[:locations] if args.key?(:locations)
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
@ -504,24 +160,24 @@ module Google
class EncryptResponse
include Google::Apis::Core::Hashable
# The encrypted data.
# Corresponds to the JSON property `ciphertext`
# @return [String]
attr_accessor :ciphertext
# The resource name of the CryptoKeyVersion used in encryption.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The encrypted data.
# Corresponds to the JSON property `ciphertext`
# @return [String]
attr_accessor :ciphertext
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ciphertext = args[:ciphertext] if args.key?(:ciphertext)
@name = args[:name] if args.key?(:name)
@ciphertext = args[:ciphertext] if args.key?(:ciphertext)
end
end
@ -529,25 +185,63 @@ module Google
class KeyRing
include Google::Apis::Core::Hashable
# Output only. The time at which this KeyRing was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Output only. The resource name for the KeyRing in the format
# `projects/*/locations/*/keyRings/*`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Output only. The time at which this KeyRing was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@name = args[:name] if args.key?(:name)
@create_time = args[:create_time] if args.key?(:create_time)
end
end
# The response message for Locations.ListLocations.
class ListLocationsResponse
include Google::Apis::Core::Hashable
# A list of locations that matches the specified filter in the request.
# Corresponds to the JSON property `locations`
# @return [Array<Google::Apis::CloudkmsV1beta1::Location>]
attr_accessor :locations
# The standard List next-page token.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@locations = args[:locations] if args.key?(:locations)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Request message for KeyManagementService.RestoreCryptoKeyVersion.
class RestoreCryptoKeyVersionRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
@ -570,19 +264,6 @@ module Google
end
end
# Request message for KeyManagementService.RestoreCryptoKeyVersion.
class RestoreCryptoKeyVersionRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Write a Data Access (Gin) log
class DataAccessOptions
include Google::Apis::Core::Hashable
@ -600,11 +281,6 @@ module Google
class ListKeyRingsResponse
include Google::Apis::Core::Hashable
# The list of KeyRings.
# Corresponds to the JSON property `keyRings`
# @return [Array<Google::Apis::CloudkmsV1beta1::KeyRing>]
attr_accessor :key_rings
# A token to retrieve next page of results. Pass this value in
# ListKeyRingsRequest.page_token to retrieve the next page of results.
# Corresponds to the JSON property `nextPageToken`
@ -616,15 +292,20 @@ module Google
# @return [Fixnum]
attr_accessor :total_size
# The list of KeyRings.
# Corresponds to the JSON property `keyRings`
# @return [Array<Google::Apis::CloudkmsV1beta1::KeyRing>]
attr_accessor :key_rings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key_rings = args[:key_rings] if args.key?(:key_rings)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@total_size = args[:total_size] if args.key?(:total_size)
@key_rings = args[:key_rings] if args.key?(:key_rings)
end
end
@ -635,12 +316,6 @@ module Google
class AuditConfig
include Google::Apis::Core::Hashable
# The configuration for logging of each type of permission.
# Next ID: 4
# Corresponds to the JSON property `auditLogConfigs`
# @return [Array<Google::Apis::CloudkmsV1beta1::AuditLogConfig>]
attr_accessor :audit_log_configs
# Specifies the identities that are exempted from "data access" audit
# logging for the `service` specified above.
# Follows the same format of Binding.members.
@ -656,15 +331,21 @@ module Google
# @return [String]
attr_accessor :service
# The configuration for logging of each type of permission.
# Next ID: 4
# Corresponds to the JSON property `auditLogConfigs`
# @return [Array<Google::Apis::CloudkmsV1beta1::AuditLogConfig>]
attr_accessor :audit_log_configs
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@service = args[:service] if args.key?(:service)
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
end
end
@ -676,6 +357,13 @@ module Google
class CryptoKeyVersion
include Google::Apis::Core::Hashable
# Output only. The time this CryptoKeyVersion's key material is scheduled
# for destruction. Only present if state is
# DESTROY_SCHEDULED.
# Corresponds to the JSON property `destroyTime`
# @return [String]
attr_accessor :destroy_time
# Output only. The time at which this CryptoKeyVersion was created.
# Corresponds to the JSON property `createTime`
# @return [String]
@ -699,24 +387,17 @@ module Google
# @return [String]
attr_accessor :destroy_event_time
# Output only. The time this CryptoKeyVersion's key material is scheduled
# for destruction. Only present if state is
# DESTROY_SCHEDULED.
# Corresponds to the JSON property `destroyTime`
# @return [String]
attr_accessor :destroy_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@destroy_time = args[:destroy_time] if args.key?(:destroy_time)
@create_time = args[:create_time] if args.key?(:create_time)
@state = args[:state] if args.key?(:state)
@name = args[:name] if args.key?(:name)
@destroy_event_time = args[:destroy_event_time] if args.key?(:destroy_event_time)
@destroy_time = args[:destroy_time] if args.key?(:destroy_time)
end
end
@ -936,6 +617,23 @@ module Google
class CryptoKey
include Google::Apis::Core::Hashable
# The immutable purpose of this CryptoKey. Currently, the only acceptable
# purpose is ENCRYPT_DECRYPT.
# Corresponds to the JSON property `purpose`
# @return [String]
attr_accessor :purpose
# At next_rotation_time, the Key Management Service will automatically:
# 1. Create a new version of this CryptoKey.
# 2. Mark the new version as primary.
# Key rotations performed manually via
# CreateCryptoKeyVersion and
# UpdateCryptoKeyPrimaryVersion
# do not affect next_rotation_time.
# Corresponds to the JSON property `nextRotationTime`
# @return [String]
attr_accessor :next_rotation_time
# Output only. The time at which this CryptoKey was created.
# Corresponds to the JSON property `createTime`
# @return [String]
@ -963,22 +661,56 @@ module Google
# @return [String]
attr_accessor :name
# The immutable purpose of this CryptoKey. Currently, the only acceptable
# purpose is ENCRYPT_DECRYPT.
# Corresponds to the JSON property `purpose`
# @return [String]
attr_accessor :purpose
def initialize(**args)
update!(**args)
end
# At next_rotation_time, the Key Management Service will automatically:
# 1. Create a new version of this CryptoKey.
# 2. Mark the new version as primary.
# Key rotations performed manually via
# CreateCryptoKeyVersion and
# UpdateCryptoKeyPrimaryVersion
# do not affect next_rotation_time.
# Corresponds to the JSON property `nextRotationTime`
# @return [String]
attr_accessor :next_rotation_time
# Update properties of this object
def update!(**args)
@purpose = args[:purpose] if args.key?(:purpose)
@next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time)
@create_time = args[:create_time] if args.key?(:create_time)
@rotation_period = args[:rotation_period] if args.key?(:rotation_period)
@primary = args[:primary] if args.key?(:primary)
@name = args[:name] if args.key?(:name)
end
end
# Specifies what kind of log the caller must write
# Increment a streamz counter with the specified metric and field names.
# Metric names should start with a '/', generally be lowercase-only,
# and end in "_count". Field names should not contain an initial slash.
# The actual exported metric names will have "/iam/policy" prepended.
# Field names correspond to IAM request parameters and field values are
# their respective values.
# At present the only supported field names are
# - "iam_principal", corresponding to IAMContext.principal;
# - "" (empty string), resulting in one aggretated counter with no field.
# Examples:
# counter ` metric: "/debug_access_count" field: "iam_principal" `
# ==> increment counter /iam/policy/backend_debug_access_count
# `iam_principal=[value of IAMContext.principal]`
# At this time we do not support:
# * multiple field names (though this may be supported in the future)
# * decrementing the counter
# * incrementing it by anything other than 1
class LogConfig
include Google::Apis::Core::Hashable
# Write a Cloud Audit log
# Corresponds to the JSON property `cloudAudit`
# @return [Google::Apis::CloudkmsV1beta1::CloudAuditOptions]
attr_accessor :cloud_audit
# Options for counters
# Corresponds to the JSON property `counter`
# @return [Google::Apis::CloudkmsV1beta1::CounterOptions]
attr_accessor :counter
# Write a Data Access (Gin) log
# Corresponds to the JSON property `dataAccess`
# @return [Google::Apis::CloudkmsV1beta1::DataAccessOptions]
attr_accessor :data_access
def initialize(**args)
update!(**args)
@ -986,12 +718,280 @@ module Google
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@rotation_period = args[:rotation_period] if args.key?(:rotation_period)
@primary = args[:primary] if args.key?(:primary)
@cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit)
@counter = args[:counter] if args.key?(:counter)
@data_access = args[:data_access] if args.key?(:data_access)
end
end
# Request message for `SetIamPolicy` method.
class SetIamPolicyRequest
include Google::Apis::Core::Hashable
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
# **Example**
# `
# "bindings": [
# `
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# `,
# `
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# `
# ]
# `
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::CloudkmsV1beta1::Policy]
attr_accessor :policy
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
# the fields in the mask will be modified. If no mask is provided, a default
# mask is used:
# paths: "bindings, etag"
# This field is only used by Cloud IAM.
# Corresponds to the JSON property `updateMask`
# @return [String]
attr_accessor :update_mask
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@policy = args[:policy] if args.key?(:policy)
@update_mask = args[:update_mask] if args.key?(:update_mask)
end
end
# Request message for KeyManagementService.Decrypt.
class DecryptRequest
include Google::Apis::Core::Hashable
# Required. The encrypted data originally returned in
# EncryptResponse.ciphertext.
# Corresponds to the JSON property `ciphertext`
# @return [String]
attr_accessor :ciphertext
# Optional data that must match the data originally supplied in
# EncryptRequest.additional_authenticated_data.
# Corresponds to the JSON property `additionalAuthenticatedData`
# @return [String]
attr_accessor :additional_authenticated_data
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ciphertext = args[:ciphertext] if args.key?(:ciphertext)
@additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data)
end
end
# A resource that represents Google Cloud Platform location.
class Location
include Google::Apis::Core::Hashable
# Cross-service attributes for the location. For example
# `"cloud.googleapis.com/region": "us-east1"`
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Resource name for the location, which may vary between implementations.
# For example: `"projects/example-project/locations/us-east1"`
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The canonical id for this location. For example: `"us-east1"`.
# Corresponds to the JSON property `locationId`
# @return [String]
attr_accessor :location_id
# Service-specific metadata. For example the available capacity at the given
# location.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
@purpose = args[:purpose] if args.key?(:purpose)
@next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time)
@location_id = args[:location_id] if args.key?(:location_id)
@metadata = args[:metadata] if args.key?(:metadata)
end
end
# Response message for KeyManagementService.ListCryptoKeys.
class ListCryptoKeysResponse
include Google::Apis::Core::Hashable
# A token to retrieve next page of results. Pass this value in
# ListCryptoKeysRequest.page_token to retrieve the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The list of CryptoKeys.
# Corresponds to the JSON property `cryptoKeys`
# @return [Array<Google::Apis::CloudkmsV1beta1::CryptoKey>]
attr_accessor :crypto_keys
# The total number of CryptoKeys that matched the query.
# Corresponds to the JSON property `totalSize`
# @return [Fixnum]
attr_accessor :total_size
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@crypto_keys = args[:crypto_keys] if args.key?(:crypto_keys)
@total_size = args[:total_size] if args.key?(:total_size)
end
end
# A condition to be met.
class Condition
include Google::Apis::Core::Hashable
# An operator to apply the subject with.
# Corresponds to the JSON property `op`
# @return [String]
attr_accessor :op
# Trusted attributes discharged by the service.
# Corresponds to the JSON property `svc`
# @return [String]
attr_accessor :svc
# Trusted attributes supplied by any service that owns resources and uses
# the IAM system for access control.
# Corresponds to the JSON property `sys`
# @return [String]
attr_accessor :sys
# DEPRECATED. Use 'values' instead.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
# Trusted attributes supplied by the IAM system.
# Corresponds to the JSON property `iam`
# @return [String]
attr_accessor :iam
# The objects of the condition. This is mutually exclusive with 'value'.
# Corresponds to the JSON property `values`
# @return [Array<String>]
attr_accessor :values
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@op = args[:op] if args.key?(:op)
@svc = args[:svc] if args.key?(:svc)
@sys = args[:sys] if args.key?(:sys)
@value = args[:value] if args.key?(:value)
@iam = args[:iam] if args.key?(:iam)
@values = args[:values] if args.key?(:values)
end
end
# Options for counters
class CounterOptions
include Google::Apis::Core::Hashable
# The metric to update.
# Corresponds to the JSON property `metric`
# @return [String]
attr_accessor :metric
# The field value to attribute.
# Corresponds to the JSON property `field`
# @return [String]
attr_accessor :field
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metric = args[:metric] if args.key?(:metric)
@field = args[:field] if args.key?(:field)
end
end
# Provides the configuration for logging a type of permissions.
# Example:
# `
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# "exempted_members": [
# "user:foo@gmail.com"
# ]
# `,
# `
# "log_type": "DATA_WRITE",
# `
# ]
# `
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
# foo@gmail.com from DATA_READ logging.
class AuditLogConfig
include Google::Apis::Core::Hashable
# Specifies the identities that do not cause logging for this type of
# permission.
# Follows the same format of Binding.members.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
# The log type that this config enables.
# Corresponds to the JSON property `logType`
# @return [String]
attr_accessor :log_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@log_type = args[:log_type] if args.key?(:log_type)
end
end
end

View File

@ -22,54 +22,6 @@ module Google
module Apis
module CloudkmsV1beta1
class LogConfig
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 DecryptRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Location
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListCryptoKeysResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Condition
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CounterOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AuditLogConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DecryptResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -82,12 +34,6 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListLocationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Policy
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -106,7 +52,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class UpdateCryptoKeyPrimaryVersionRequest
class ListLocationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -118,6 +64,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class UpdateCryptoKeyPrimaryVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DataAccessOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -191,80 +143,51 @@ module Google
end
class LogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1beta1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1beta1::DataAccessOptions::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1beta1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1beta1::CloudAuditOptions::Representation
property :counter, as: 'counter', class: Google::Apis::CloudkmsV1beta1::CounterOptions, decorator: Google::Apis::CloudkmsV1beta1::CounterOptions::Representation
end
include Google::Apis::Core::JsonObjectSupport
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :update_mask, as: 'updateMask'
property :policy, as: 'policy', class: Google::Apis::CloudkmsV1beta1::Policy, decorator: Google::Apis::CloudkmsV1beta1::Policy::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
include Google::Apis::Core::JsonObjectSupport
end
class DecryptRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ciphertext, :base64 => true, as: 'ciphertext'
property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Location
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :location_id, as: 'locationId'
hash :metadata, as: 'metadata'
hash :labels, as: 'labels'
property :name, as: 'name'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListCryptoKeysResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1beta1::CryptoKey, decorator: Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
property :total_size, as: 'totalSize'
end
include Google::Apis::Core::JsonObjectSupport
end
class Condition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :value, as: 'value'
property :sys, as: 'sys'
collection :values, as: 'values'
property :iam, as: 'iam'
property :op, as: 'op'
property :svc, as: 'svc'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CounterOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric, as: 'metric'
property :field, as: 'field'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AuditLogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers'
property :log_type, as: 'logType'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DecryptResponse
@ -281,15 +204,6 @@ module Google
end
end
class ListLocationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :locations, as: 'locations', class: Google::Apis::CloudkmsV1beta1::Location, decorator: Google::Apis::CloudkmsV1beta1::Location::Representation
end
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -308,16 +222,31 @@ module Google
class EncryptResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ciphertext, :base64 => true, as: 'ciphertext'
property :name, as: 'name'
property :ciphertext, :base64 => true, as: 'ciphertext'
end
end
class KeyRing
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :name, as: 'name'
property :create_time, as: 'createTime'
end
end
class ListLocationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :locations, as: 'locations', class: Google::Apis::CloudkmsV1beta1::Location, decorator: Google::Apis::CloudkmsV1beta1::Location::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class RestoreCryptoKeyVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
@ -328,12 +257,6 @@ module Google
end
end
class RestoreCryptoKeyVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class DataAccessOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -343,31 +266,31 @@ module Google
class ListKeyRingsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :key_rings, as: 'keyRings', class: Google::Apis::CloudkmsV1beta1::KeyRing, decorator: Google::Apis::CloudkmsV1beta1::KeyRing::Representation
property :next_page_token, as: 'nextPageToken'
property :total_size, as: 'totalSize'
collection :key_rings, as: 'keyRings', class: Google::Apis::CloudkmsV1beta1::KeyRing, decorator: Google::Apis::CloudkmsV1beta1::KeyRing::Representation
end
end
class AuditConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudkmsV1beta1::AuditLogConfig, decorator: Google::Apis::CloudkmsV1beta1::AuditLogConfig::Representation
collection :exempted_members, as: 'exemptedMembers'
property :service, as: 'service'
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudkmsV1beta1::AuditLogConfig, decorator: Google::Apis::CloudkmsV1beta1::AuditLogConfig::Representation
end
end
class CryptoKeyVersion
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :destroy_time, as: 'destroyTime'
property :create_time, as: 'createTime'
property :state, as: 'state'
property :name, as: 'name'
property :destroy_event_time, as: 'destroyEventTime'
property :destroy_time, as: 'destroyTime'
end
end
@ -434,13 +357,90 @@ module Google
class CryptoKey
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :purpose, as: 'purpose'
property :next_rotation_time, as: 'nextRotationTime'
property :create_time, as: 'createTime'
property :rotation_period, as: 'rotationPeriod'
property :primary, as: 'primary', class: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
property :name, as: 'name'
property :purpose, as: 'purpose'
property :next_rotation_time, as: 'nextRotationTime'
end
end
class LogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1beta1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1beta1::CloudAuditOptions::Representation
property :counter, as: 'counter', class: Google::Apis::CloudkmsV1beta1::CounterOptions, decorator: Google::Apis::CloudkmsV1beta1::CounterOptions::Representation
property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1beta1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1beta1::DataAccessOptions::Representation
end
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :policy, as: 'policy', class: Google::Apis::CloudkmsV1beta1::Policy, decorator: Google::Apis::CloudkmsV1beta1::Policy::Representation
property :update_mask, as: 'updateMask'
end
end
class DecryptRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ciphertext, :base64 => true, as: 'ciphertext'
property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData'
end
end
class Location
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :labels, as: 'labels'
property :name, as: 'name'
property :location_id, as: 'locationId'
hash :metadata, as: 'metadata'
end
end
class ListCryptoKeysResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1beta1::CryptoKey, decorator: Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
property :total_size, as: 'totalSize'
end
end
class Condition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :op, as: 'op'
property :svc, as: 'svc'
property :sys, as: 'sys'
property :value, as: 'value'
property :iam, as: 'iam'
collection :values, as: 'values'
end
end
class CounterOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric, as: 'metric'
property :field, as: 'field'
end
end
class AuditLogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers'
property :log_type, as: 'logType'
end
end
end

View File

@ -50,12 +50,12 @@ module Google
# Lists information about the supported locations for this service.
# @param [String] name
# The resource that owns the locations collection, if applicable.
# @param [String] filter
# The standard list filter.
# @param [String] page_token
# The standard list page token.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] filter
# The standard list filter.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -73,14 +73,14 @@ 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 list_project_locations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_locations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::ListLocationsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::ListLocationsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
@ -116,18 +116,122 @@ module Google
execute_or_queue_command(command, &block)
end
# Gets the access control policy for a resource.
# Returns an empty policy if the resource exists and does not have a policy
# set.
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @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::CloudkmsV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::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_project_location_key_ring_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::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 metadata for a given KeyRing.
# @param [String] name
# The name of the KeyRing to get.
# @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::CloudkmsV1beta1::KeyRing] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::KeyRing]
#
# @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_key_ring(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::KeyRing
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 permissions that a caller has on the specified resource.
# If the resource does not exist, this will return an empty set of
# permissions, not a 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.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::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::CloudkmsV1beta1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::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_key_ring_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists KeyRings.
# @param [String] parent
# Required. The resource name of the location associated with the
# KeyRings, in the format `projects/*/locations/*`.
# @param [String] page_token
# Optional pagination token, returned earlier via
# ListKeyRingsResponse.next_page_token.
# @param [Fixnum] page_size
# Optional limit on the number of KeyRings to include in the
# response. Further KeyRings can subsequently be obtained by
# including the ListKeyRingsResponse.next_page_token in a subsequent
# request. If unspecified, the server will pick an appropriate default.
# @param [String] page_token
# Optional pagination token, returned earlier via
# ListKeyRingsResponse.next_page_token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -145,13 +249,13 @@ 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 list_project_location_key_rings(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_location_key_rings(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/keyRings', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
@ -231,246 +335,6 @@ module Google
execute_or_queue_command(command, &block)
end
# Gets the access control policy for a resource.
# Returns an empty policy if the resource exists and does not have a policy
# set.
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @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::CloudkmsV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::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_project_location_key_ring_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::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 metadata for a given KeyRing.
# @param [String] name
# The name of the KeyRing to get.
# @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::CloudkmsV1beta1::KeyRing] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::KeyRing]
#
# @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_key_ring(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::KeyRing
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 permissions that a caller has on the specified resource.
# If the resource does not exist, this will return an empty set of
# permissions, not a NOT_FOUND error.
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::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::CloudkmsV1beta1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::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_key_ring_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::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
# Returns metadata for a given CryptoKey, as well as its
# primary CryptoKeyVersion.
# @param [String] name
# The name of the CryptoKey to get.
# @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::CloudkmsV1beta1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
#
# @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_key_ring_crypto_key(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
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
# Update a CryptoKey.
# @param [String] name
# Output only. The resource name for this CryptoKey in the format
# `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
# @param [Google::Apis::CloudkmsV1beta1::CryptoKey] crypto_key_object
# @param [String] update_mask
# Required list of fields to be updated in this request.
# @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::CloudkmsV1beta1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
#
# @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_key_ring_crypto_key(name, crypto_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
command.request_object = crypto_key_object
command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
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
# Returns permissions that a caller has on the specified resource.
# If the resource does not exist, this will return an empty set of
# permissions, not a NOT_FOUND error.
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::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::CloudkmsV1beta1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::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_crypto_key_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::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
# Decrypt data that was protected by Encrypt.
# @param [String] name
# Required. The resource name of the CryptoKey to use for decryption.
# The server will choose the appropriate version.
# @param [Google::Apis::CloudkmsV1beta1::DecryptRequest] decrypt_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::CloudkmsV1beta1::DecryptResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::DecryptResponse]
#
# @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 decrypt_crypto_key(name, decrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+name}:decrypt', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::DecryptRequest::Representation
command.request_object = decrypt_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::DecryptResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::DecryptResponse
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 CryptoKeys.
# @param [String] parent
# Required. The resource name of the KeyRing to list, in the format
@ -548,42 +412,6 @@ module Google
execute_or_queue_command(command, &block)
end
# Sets the access control policy on the specified resource. Replaces any
# existing policy.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::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::CloudkmsV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::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_crypto_key_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::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
# Create a new CryptoKey within a KeyRing.
# CryptoKey.purpose is required.
# @param [String] parent
@ -623,6 +451,42 @@ module Google
execute_or_queue_command(command, &block)
end
# Sets the access control policy on the specified resource. Replaces any
# existing policy.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::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::CloudkmsV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::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_crypto_key_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::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
# Update the version of a CryptoKey that will be used in Encrypt
# @param [String] name
# The resource name of the CryptoKey to update.
@ -690,6 +554,148 @@ module Google
execute_or_queue_command(command, &block)
end
# Update a CryptoKey.
# @param [String] name
# Output only. The resource name for this CryptoKey in the format
# `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
# @param [Google::Apis::CloudkmsV1beta1::CryptoKey] crypto_key_object
# @param [String] update_mask
# Required list of fields to be updated in this request.
# @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::CloudkmsV1beta1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
#
# @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_key_ring_crypto_key(name, crypto_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
command.request_object = crypto_key_object
command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
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
# Returns metadata for a given CryptoKey, as well as its
# primary CryptoKeyVersion.
# @param [String] name
# The name of the CryptoKey to get.
# @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::CloudkmsV1beta1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
#
# @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_key_ring_crypto_key(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
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 permissions that a caller has on the specified resource.
# If the resource does not exist, this will return an empty set of
# permissions, not a 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.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::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::CloudkmsV1beta1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::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_crypto_key_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::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
# Decrypt data that was protected by Encrypt.
# @param [String] name
# Required. The resource name of the CryptoKey to use for decryption.
# The server will choose the appropriate version.
# @param [Google::Apis::CloudkmsV1beta1::DecryptRequest] decrypt_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::CloudkmsV1beta1::DecryptResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::DecryptResponse]
#
# @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 decrypt_crypto_key(name, decrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+name}:decrypt', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::DecryptRequest::Representation
command.request_object = decrypt_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::DecryptResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::DecryptResponse
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
# Restore a CryptoKeyVersion in the
# DESTROY_SCHEDULED,
# state.
@ -728,36 +734,6 @@ module Google
execute_or_queue_command(command, &block)
end
# Returns metadata for a given CryptoKeyVersion.
# @param [String] name
# The name of the CryptoKeyVersion to get.
# @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::CloudkmsV1beta1::CryptoKeyVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion]
#
# @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_key_ring_crypto_key_crypto_key_version(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
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
# Update a CryptoKeyVersion's metadata.
# state may be changed between
# ENABLED and
@ -800,19 +776,49 @@ module Google
execute_or_queue_command(command, &block)
end
# Returns metadata for a given CryptoKeyVersion.
# @param [String] name
# The name of the CryptoKeyVersion to get.
# @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::CloudkmsV1beta1::CryptoKeyVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion]
#
# @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_key_ring_crypto_key_crypto_key_version(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
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 CryptoKeyVersions.
# @param [String] parent
# Required. The resource name of the CryptoKey to list, in the format
# `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
# @param [String] page_token
# Optional pagination token, returned earlier via
# ListCryptoKeyVersionsResponse.next_page_token.
# @param [Fixnum] page_size
# Optional limit on the number of CryptoKeyVersions to
# include in the response. Further CryptoKeyVersions can
# subsequently be obtained by including the
# ListCryptoKeyVersionsResponse.next_page_token in a subsequent request.
# If unspecified, the server will pick an appropriate default.
# @param [String] page_token
# Optional pagination token, returned earlier via
# ListCryptoKeyVersionsResponse.next_page_token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -830,13 +836,13 @@ 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 list_project_location_key_ring_crypto_key_crypto_key_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_location_key_ring_crypto_key_crypto_key_versions(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/cryptoKeyVersions', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)

View File

@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/resource-manager
module CloudresourcemanagerV1
VERSION = 'V1'
REVISION = '20170201'
REVISION = '20170208'
# View your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'

View File

@ -108,6 +108,12 @@ module Google
class Status
include Google::Apis::Core::Hashable
# A list of messages that carry the error details. There will be a
# common set of message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
# The status code, which should be an enum value of google.rpc.Code.
# Corresponds to the JSON property `code`
# @return [Fixnum]
@ -120,21 +126,15 @@ module Google
# @return [String]
attr_accessor :message
# A list of messages that carry the error details. There will be a
# common set of message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@details = args[:details] if args.key?(:details)
@code = args[:code] if args.key?(:code)
@message = args[:message] if args.key?(:message)
@details = args[:details] if args.key?(:details)
end
end
@ -216,14 +216,6 @@ module Google
class Organization
include Google::Apis::Core::Hashable
# A friendly string to be used to refer to the Organization in the UI.
# Assigned by the server, set to the firm name of the Google For Work
# customer that owns this organization.
# @OutputOnly
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Timestamp when the Organization was created. Assigned by the server.
# @OutputOnly
# Corresponds to the JSON property `creationTime`
@ -251,17 +243,25 @@ module Google
# @return [String]
attr_accessor :name
# A friendly string to be used to refer to the Organization in the UI.
# Assigned by the server, set to the primary domain of the G Suite
# customer that owns the organization.
# @OutputOnly
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@creation_time = args[:creation_time] if args.key?(:creation_time)
@owner = args[:owner] if args.key?(:owner)
@lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
@name = args[:name] if args.key?(:name)
@display_name = args[:display_name] if args.key?(:display_name)
end
end
@ -335,27 +335,6 @@ module Google
end
end
# Response from the GetAncestry method.
class GetAncestryResponse
include Google::Apis::Core::Hashable
# Ancestors are ordered from bottom to top of the resource hierarchy. The
# first ancestor is the project itself, followed by the project's parent,
# etc.
# Corresponds to the JSON property `ancestor`
# @return [Array<Google::Apis::CloudresourcemanagerV1::Ancestor>]
attr_accessor :ancestor
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ancestor = args[:ancestor] if args.key?(:ancestor)
end
end
# The entity that owns an Organization. The lifetime of the Organization and
# all of its descendants are bound to the `OrganizationOwner`. If the
# `OrganizationOwner` is deleted, the Organization and all its descendants will
@ -378,6 +357,27 @@ module Google
end
end
# Response from the GetAncestry method.
class GetAncestryResponse
include Google::Apis::Core::Hashable
# Ancestors are ordered from bottom to top of the resource hierarchy. The
# first ancestor is the project itself, followed by the project's parent,
# etc.
# Corresponds to the JSON property `ancestor`
# @return [Array<Google::Apis::CloudresourcemanagerV1::Ancestor>]
attr_accessor :ancestor
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ancestor = args[:ancestor] if args.key?(:ancestor)
end
end
# A page of the response received from the
# ListProjects
# method.
@ -387,12 +387,6 @@ module Google
class ListProjectsResponse
include Google::Apis::Core::Hashable
# The list of Projects that matched the list filter. This list can
# be paginated.
# Corresponds to the JSON property `projects`
# @return [Array<Google::Apis::CloudresourcemanagerV1::Project>]
attr_accessor :projects
# Pagination token.
# If the result set is too large to fit in a single response, this token
# is returned. It encodes the position of the current result cursor.
@ -405,14 +399,20 @@ module Google
# @return [String]
attr_accessor :next_page_token
# The list of Projects that matched the list filter. This list can
# be paginated.
# Corresponds to the JSON property `projects`
# @return [Array<Google::Apis::CloudresourcemanagerV1::Project>]
attr_accessor :projects
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@projects = args[:projects] if args.key?(:projects)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@projects = args[:projects] if args.key?(:projects)
end
end
@ -557,28 +557,6 @@ module Google
end
end
# Request message for `TestIamPermissions` method.
class TestIamPermissionsRequest
include Google::Apis::Core::Hashable
# The set of permissions to check for the `resource`. Permissions with
# wildcards (such as '*' or 'storage.*') are not allowed. For more
# information see
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# The response returned from the `SearchOrganizations` method.
class SearchOrganizationsResponse
include Google::Apis::Core::Hashable
@ -609,6 +587,86 @@ module Google
end
end
# Request message for `TestIamPermissions` method.
class TestIamPermissionsRequest
include Google::Apis::Core::Hashable
# The set of permissions to check for the `resource`. Permissions with
# wildcards (such as '*' or 'storage.*') are not allowed. For more
# information see
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# A classification of the Folder Operation error.
class FolderOperationError
include Google::Apis::Core::Hashable
# The type of operation error experienced.
# Corresponds to the JSON property `errorMessageId`
# @return [String]
attr_accessor :error_message_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_message_id = args[:error_message_id] if args.key?(:error_message_id)
end
end
# Metadata describing a long running folder operation
class FolderOperation
include Google::Apis::Core::Hashable
# The display name of the folder.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# The resource name of the folder's parent.
# Only applicable when the operation_type is MOVE.
# Corresponds to the JSON property `sourceParent`
# @return [String]
attr_accessor :source_parent
# The resource name of the folder or organization we are either creating
# the folder under or moving the folder to.
# Corresponds to the JSON property `destinationParent`
# @return [String]
attr_accessor :destination_parent
# The type of this operation.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@source_parent = args[:source_parent] if args.key?(:source_parent)
@destination_parent = args[:destination_parent] if args.key?(:destination_parent)
@operation_type = args[:operation_type] if args.key?(:operation_type)
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
@ -675,64 +733,6 @@ module Google
end
end
# Metadata describing a long running folder operation
class FolderOperation
include Google::Apis::Core::Hashable
# The type of this operation.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
# The display name of the folder.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# The resource name of the folder's parent.
# Only applicable when the operation_type is MOVE.
# Corresponds to the JSON property `sourceParent`
# @return [String]
attr_accessor :source_parent
# The resource name of the folder or organization we are either creating
# the folder under or moving the folder to.
# Corresponds to the JSON property `destinationParent`
# @return [String]
attr_accessor :destination_parent
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operation_type = args[:operation_type] if args.key?(:operation_type)
@display_name = args[:display_name] if args.key?(:display_name)
@source_parent = args[:source_parent] if args.key?(:source_parent)
@destination_parent = args[:destination_parent] if args.key?(:destination_parent)
end
end
# A classification of the Folder Operation error.
class FolderOperationError
include Google::Apis::Core::Hashable
# The type of operation error experienced.
# Corresponds to the JSON property `errorMessageId`
# @return [String]
attr_accessor :error_message_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_message_id = args[:error_message_id] if args.key?(:error_message_id)
end
end
# A container to reference an id for any resource type. A `resource` in Google
# Cloud Platform is a generic term for something you (a developer) may want to
# interact with through one of our API's. Some examples are an AppEngine app,

View File

@ -76,13 +76,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class GetAncestryResponse
class OrganizationOwner
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class OrganizationOwner
class GetAncestryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -112,19 +112,19 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class TestIamPermissionsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SearchOrganizationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Policy
class TestIamPermissionsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FolderOperationError
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -136,7 +136,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class FolderOperationError
class Policy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -171,9 +171,9 @@ module Google
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :details, as: 'details'
property :code, as: 'code'
property :message, as: 'message'
collection :details, as: 'details'
end
end
@ -200,12 +200,12 @@ module Google
class Organization
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :creation_time, as: 'creationTime'
property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1::OrganizationOwner::Representation
property :lifecycle_state, as: 'lifecycleState'
property :name, as: 'name'
property :display_name, as: 'displayName'
end
end
@ -231,6 +231,13 @@ module Google
end
end
class OrganizationOwner
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :directory_customer_id, as: 'directoryCustomerId'
end
end
class GetAncestryResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -239,19 +246,12 @@ module Google
end
end
class OrganizationOwner
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :directory_customer_id, as: 'directoryCustomerId'
end
end
class ListProjectsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1::Project, decorator: Google::Apis::CloudresourcemanagerV1::Project::Representation
property :next_page_token, as: 'nextPageToken'
end
end
@ -284,6 +284,15 @@ module Google
end
end
class SearchOrganizationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1::Organization, decorator: Google::Apis::CloudresourcemanagerV1::Organization::Representation
end
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -291,12 +300,20 @@ module Google
end
end
class SearchOrganizationsResponse
class FolderOperationError
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1::Organization, decorator: Google::Apis::CloudresourcemanagerV1::Organization::Representation
property :error_message_id, as: 'errorMessageId'
end
end
class FolderOperation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :source_parent, as: 'sourceParent'
property :destination_parent, as: 'destinationParent'
property :operation_type, as: 'operationType'
end
end
@ -310,23 +327,6 @@ module Google
end
end
class FolderOperation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :operation_type, as: 'operationType'
property :display_name, as: 'displayName'
property :source_parent, as: 'sourceParent'
property :destination_parent, as: 'destinationParent'
end
end
class FolderOperationError
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :error_message_id, as: 'errorMessageId'
end
end
class ResourceId
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -47,6 +47,310 @@ module Google
super('https://cloudresourcemanager.googleapis.com/', '')
end
# Gets the access control policy for an Organization resource. May be empty
# if no such policy or resource exists. The `resource` field should be the
# organization's resource name, e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::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
# Searches Organization resources that are visible to the user and satisfy
# the specified filter. This method returns Organizations in an unspecified
# order. New Organizations do not necessarily appear at the end of the
# results.
# @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_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::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/organizations:search', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation
command.request_object = search_organizations_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Fetches an Organization resource identified by the specified resource name.
# @param [String] name
# The resource name of the Organization to fetch, e.g. "organizations/1234".
# @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::CloudresourcemanagerV1::Organization] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::Organization]
#
# @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_organization(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Organization
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 on an Organization resource. Replaces any
# existing policy. The `resource` field should be the organization's resource
# name, e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::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 the specified Organization.
# The `resource` field should be the organization's resource name,
# e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::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::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the latest state of a long-running operation. Clients can use this
# method to poll the operation result at intervals as recommended by the API
# service.
# @param [String] name
# The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Request that a new Project be created. The result is an Operation which
# can be used to track the creation process. It is automatically deleted
# after a few hours, so there is no need to call DeleteOperation.
# Our SLO permits Project creation to take up to 30 seconds at the 90th
# percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
# latency. 95th percentile latency is around 11 seconds. We recommend
# polling at the 5th second with an exponential backoff.
# @param [Google::Apis::CloudresourcemanagerV1::Project] project_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::CloudresourcemanagerV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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 create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
command.request_object = project_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
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 IAM access control policy for the specified Project. Replaces
# any existing policy.
# The following constraints apply when using `setIamPolicy()`:
# + Project does not support `allUsers` and `allAuthenticatedUsers` as
# `members` in a `Binding` of a `Policy`.
# + The owner role can be granted only to `user` and `serviceAccount`.
# + Service accounts can be made owners of a project directly
# without any restrictions. However, to be added as an owner, a user must be
# invited via Cloud Platform console and must accept the invitation.
# + A user cannot be granted the owner role using `setIamPolicy()`. The user
# must be granted the owner role using the Cloud Platform Console and must
# explicitly accept the invitation.
# + Invitations to grant the owner role cannot be sent using
# `setIamPolicy()`;
# they must be sent only using the Cloud Platform Console.
# + Membership changes that leave the project without any owners that have
# accepted the Terms of Service (ToS) will be rejected.
# + There must be at least one owner who has accepted the Terms of
# Service (ToS) agreement in the policy. Calling `setIamPolicy()` to
# to remove the last ToS-accepted owner from the policy will fail. This
# restriction also applies to legacy projects that no longer have owners
# who have accepted the ToS. Edits to IAM policies will be rejected until
# the lack of a ToS-accepting owner is rectified.
# + Calling this method requires enabling the App Engine Admin API.
# Note: Removing service accounts from policies or changing their roles
# can render services completely inoperable. It is important to understand
# how the service account is being used before removing or updating its
# roles.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns the IAM access control policy for the specified Project.
# Permission is denied if the policy or the resource does not exist.
# @param [String] resource
@ -83,6 +387,39 @@ module Google
execute_or_queue_command(command, &block)
end
# Retrieves the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# The caller must have read permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `my-project-123`).
# Required.
# @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::CloudresourcemanagerV1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::Project]
#
# @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(project_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Project
command.params['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
# Restores the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# You can only use this method for a Project that has a lifecycle state of
@ -122,39 +459,6 @@ module Google
execute_or_queue_command(command, &block)
end
# Retrieves the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# The caller must have read permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `my-project-123`).
# Required.
# @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::CloudresourcemanagerV1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::Project]
#
# @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(project_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Project
command.params['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
# Gets a list of ancestors in the resource hierarchy for the Project
# identified by the specified `project_id` (for example, `my-project-123`).
# The caller must have read permissions for this Project.
@ -314,11 +618,6 @@ module Google
# Lists Projects that are visible to the user and satisfy the
# specified filter. This method returns Projects in an unspecified order.
# New Projects do not necessarily appear at the end of the list.
# @param [Fixnum] page_size
# The maximum number of Projects to return in the response.
# The server can return fewer Projects than requested.
# If unspecified, server picks an appropriate default.
# Optional.
# @param [String] filter
# An expression for filtering the results of the request. Filter rules are
# case insensitive. The fields eligible for filtering are:
@ -341,6 +640,11 @@ module Google
# A pagination token returned from a previous call to ListProjects
# that indicates from where listing should continue.
# Optional.
# @param [Fixnum] page_size
# The maximum number of Projects to return in the response.
# The server can return fewer Projects than requested.
# If unspecified, server picks an appropriate default.
# Optional.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -358,317 +662,13 @@ 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 list_projects(page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_projects(filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.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
# Request that a new Project be created. The result is an Operation which
# can be used to track the creation process. It is automatically deleted
# after a few hours, so there is no need to call DeleteOperation.
# Our SLO permits Project creation to take up to 30 seconds at the 90th
# percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
# latency. 95th percentile latency is around 11 seconds. We recommend
# polling at the 5th second with an exponential backoff.
# @param [Google::Apis::CloudresourcemanagerV1::Project] project_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::CloudresourcemanagerV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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 create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
command.request_object = project_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
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 IAM access control policy for the specified Project. Replaces
# any existing policy.
# The following constraints apply when using `setIamPolicy()`:
# + Project does not support `allUsers` and `allAuthenticatedUsers` as
# `members` in a `Binding` of a `Policy`.
# + The owner role can be granted only to `user` and `serviceAccount`.
# + Service accounts can be made owners of a project directly
# without any restrictions. However, to be added as an owner, a user must be
# invited via Cloud Platform console and must accept the invitation.
# + A user cannot be granted the owner role using `setIamPolicy()`. The user
# must be granted the owner role using the Cloud Platform Console and must
# explicitly accept the invitation.
# + Invitations to grant the owner role cannot be sent using
# `setIamPolicy()`;
# they must be sent only using the Cloud Platform Console.
# + Membership changes that leave the project without any owners that have
# accepted the Terms of Service (ToS) will be rejected.
# + There must be at least one owner who has accepted the Terms of
# Service (ToS) agreement in the policy. Calling `setIamPolicy()` to
# to remove the last ToS-accepted owner from the policy will fail. This
# restriction also applies to legacy projects that no longer have owners
# who have accepted the ToS. Edits to IAM policies will be rejected until
# the lack of a ToS-accepting owner is rectified.
# + Calling this method requires enabling the App Engine Admin API.
# Note: Removing service accounts from policies or changing their roles
# can render services completely inoperable. It is important to understand
# how the service account is being used before removing or updating its
# roles.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::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 the specified Organization.
# The `resource` field should be the organization's resource name,
# e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::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::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the access control policy for an Organization resource. May be empty
# if no such policy or resource exists. The `resource` field should be the
# organization's resource name, e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::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
# Searches Organization resources that are visible to the user and satisfy
# the specified filter. This method returns Organizations in an unspecified
# order. New Organizations do not necessarily appear at the end of the
# results.
# @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_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::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/organizations:search', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation
command.request_object = search_organizations_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Fetches an Organization resource identified by the specified resource name.
# @param [String] name
# The resource name of the Organization to fetch, e.g. "organizations/1234".
# @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::CloudresourcemanagerV1::Organization] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::Organization]
#
# @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_organization(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Organization
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 on an Organization resource. Replaces any
# existing policy. The `resource` field should be the organization's resource
# name, e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the latest state of a long-running operation. Clients can use this
# method to poll the operation result at intervals as recommended by the API
# service.
# @param [String] name
# The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
command.params['name'] = name unless name.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)

View File

@ -26,13 +26,13 @@ module Google
# @see https://cloud.google.com/resource-manager
module CloudresourcemanagerV1beta1
VERSION = 'V1beta1'
REVISION = '20170201'
# View your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
REVISION = '20170208'
# 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

View File

@ -22,428 +22,6 @@ module Google
module Apis
module CloudresourcemanagerV1beta1
# A classification of the Folder Operation error.
class FolderOperationError
include Google::Apis::Core::Hashable
# The type of operation error experienced.
# Corresponds to the JSON property `errorMessageId`
# @return [String]
attr_accessor :error_message_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_message_id = args[:error_message_id] if args.key?(:error_message_id)
end
end
# Metadata describing a long running folder operation
class FolderOperation
include Google::Apis::Core::Hashable
# The type of this operation.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
# The display name of the folder.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# The resource name of the folder's parent.
# Only applicable when the operation_type is MOVE.
# Corresponds to the JSON property `sourceParent`
# @return [String]
attr_accessor :source_parent
# The resource name of the folder or organization we are either creating
# the folder under or moving the folder to.
# Corresponds to the JSON property `destinationParent`
# @return [String]
attr_accessor :destination_parent
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operation_type = args[:operation_type] if args.key?(:operation_type)
@display_name = args[:display_name] if args.key?(:display_name)
@source_parent = args[:source_parent] if args.key?(:source_parent)
@destination_parent = args[:destination_parent] if args.key?(:destination_parent)
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
# **Example**
# `
# "bindings": [
# `
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# `,
# `
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# `
# ]
# `
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
class Policy
include Google::Apis::Core::Hashable
# Associates a list of `members` to a `role`.
# Multiple `bindings` must not be specified for the same `role`.
# `bindings` with no members will result in an error.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Binding>]
attr_accessor :bindings
# `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the
# read-modify-write cycle to perform policy updates in order to avoid race
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten blindly.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Version of the `Policy`. The default version is 0.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bindings = args[:bindings] if args.key?(:bindings)
@etag = args[:etag] if args.key?(:etag)
@version = args[:version] if args.key?(:version)
end
end
# A container to reference an id for any resource type. A `resource` in Google
# Cloud Platform is a generic term for something you (a developer) may want to
# interact with through one of our API's. Some examples are an AppEngine app,
# a Compute Engine instance, a Cloud SQL database, and so on.
class ResourceId
include Google::Apis::Core::Hashable
# Required field representing the resource type this id is for.
# At present, the valid types are "project" and "organization".
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# Required field for the type-specific id. This should correspond to the id
# used in the type-specific API's.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
@id = args[:id] if args.key?(:id)
end
end
# Identifying information for a single ancestor of a project.
class Ancestor
include Google::Apis::Core::Hashable
# A container to reference an id for any resource type. A `resource` in Google
# Cloud Platform is a generic term for something you (a developer) may want to
# interact with through one of our API's. Some examples are an AppEngine app,
# a Compute Engine instance, a Cloud SQL database, and so on.
# Corresponds to the JSON property `resourceId`
# @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId]
attr_accessor :resource_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource_id = args[:resource_id] if args.key?(:resource_id)
end
end
# Request message for `SetIamPolicy` method.
class SetIamPolicyRequest
include Google::Apis::Core::Hashable
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
# **Example**
# `
# "bindings": [
# `
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# `,
# `
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# `
# ]
# `
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
attr_accessor :policy
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@policy = args[:policy] if args.key?(:policy)
end
end
# The response returned from the `ListOrganizations` method.
class ListOrganizationsResponse
include Google::Apis::Core::Hashable
# A pagination token to be used to retrieve the next page of results. If the
# result is too large to fit within the page size specified in the request,
# this field will be set with a token that can be used to fetch the next page
# of results. If this field is empty, it indicates that this response
# contains the last page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The list of Organizations that matched the list query, possibly paginated.
# Corresponds to the JSON property `organizations`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Organization>]
attr_accessor :organizations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@organizations = args[:organizations] if args.key?(:organizations)
end
end
# Associates `members` with a `role`.
class Binding
include Google::Apis::Core::Hashable
# Specifies the identities requesting access for a Cloud Platform resource.
# `members` can have the following values:
# * `allUsers`: A special identifier that represents anyone who is
# on the internet; with or without a Google account.
# * `allAuthenticatedUsers`: A special identifier that represents anyone
# who is authenticated with a Google account or a service account.
# * `user:`emailid``: An email address that represents a specific Google
# account. For example, `alice@gmail.com` or `joe@example.com`.
# * `serviceAccount:`emailid``: An email address that represents a service
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
# * `group:`emailid``: An email address that represents a Google group.
# For example, `admins@example.com`.
# * `domain:`domain``: A Google Apps domain name that represents all the
# users of that domain. For example, `google.com` or `example.com`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The request sent to the UndeleteProject
# method.
class UndeleteProjectRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The root node in the resource hierarchy to which a particular entity's
# (e.g., company) resources belong.
class Organization
include Google::Apis::Core::Hashable
# An immutable id for the Organization that is assigned on creation. This
# should be omitted when creating a new Organization.
# This field is read-only.
# This field is deprecated and will be removed in v1. Use name instead.
# Corresponds to the JSON property `organizationId`
# @return [String]
attr_accessor :organization_id
# The organization's current lifecycle state. Assigned by the server.
# @OutputOnly
# Corresponds to the JSON property `lifecycleState`
# @return [String]
attr_accessor :lifecycle_state
# A friendly string to be used to refer to the Organization in the UI.
# Assigned by the server, set to the firm name of the Google For Work
# customer that owns this organization.
# @OutputOnly
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Timestamp when the Organization was created. Assigned by the server.
# @OutputOnly
# Corresponds to the JSON property `creationTime`
# @return [String]
attr_accessor :creation_time
# The entity that owns an Organization. The lifetime of the Organization and
# all of its descendants are bound to the `OrganizationOwner`. If the
# `OrganizationOwner` is deleted, the Organization and all its descendants will
# be deleted.
# Corresponds to the JSON property `owner`
# @return [Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner]
attr_accessor :owner
# Output Only. The resource name of the organization. This is the
# organization's relative path in the API. Its format is
# "organizations/[organization_id]". For example, "organizations/1234".
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@organization_id = args[:organization_id] if args.key?(:organization_id)
@lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
@display_name = args[:display_name] if args.key?(:display_name)
@creation_time = args[:creation_time] if args.key?(:creation_time)
@owner = args[:owner] if args.key?(:owner)
@name = args[:name] if args.key?(:name)
end
end
# A status object which is used as the `metadata` field for the Operation
# returned by CreateProject. It provides insight for when significant phases of
# Project creation have completed.
class ProjectCreationStatus
include Google::Apis::Core::Hashable
# Creation time of the project creation workflow.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# True if the project can be retrieved using GetProject. No other operations
# on the project are guaranteed to work until the project creation is
# complete.
# Corresponds to the JSON property `gettable`
# @return [Boolean]
attr_accessor :gettable
alias_method :gettable?, :gettable
# True if the project creation process is complete.
# Corresponds to the JSON property `ready`
# @return [Boolean]
attr_accessor :ready
alias_method :ready?, :ready
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@gettable = args[:gettable] if args.key?(:gettable)
@ready = args[:ready] if args.key?(:ready)
end
end
# Request message for `GetIamPolicy` method.
class GetIamPolicyRequest
include Google::Apis::Core::Hashable
@ -579,36 +157,6 @@ module Google
class Project
include Google::Apis::Core::Hashable
# Creation time.
# Read-only.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# The labels associated with this Project.
# Label keys must be between 1 and 63 characters long and must conform
# to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
# Label values must be between 0 and 63 characters long and must conform
# to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?.
# No more than 256 labels can be associated with a given resource.
# Clients should store labels in a representation such as JSON that does not
# depend on specific characters being disallowed.
# Example: <code>"environment" : "dev"</code>
# Read-write.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# The user-assigned display name of the Project.
# It must be 4 to 30 characters.
# Allowed characters are: lowercase and uppercase letters, numbers,
# hyphen, single-quote, double-quote, space, and exclamation point.
# Example: <code>My Project</code>
# Read-write.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The unique, user-assigned ID of the Project.
# It must be 6 to 30 lowercase letters, digits, or hyphens.
# It must start with a letter.
@ -640,19 +188,49 @@ module Google
# @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId]
attr_accessor :parent
# The labels associated with this Project.
# Label keys must be between 1 and 63 characters long and must conform
# to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
# Label values must be between 0 and 63 characters long and must conform
# to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?.
# No more than 256 labels can be associated with a given resource.
# Clients should store labels in a representation such as JSON that does not
# depend on specific characters being disallowed.
# Example: <code>"environment" : "dev"</code>
# Read-write.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Creation time.
# Read-only.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# The user-assigned display name of the Project.
# It must be 4 to 30 characters.
# Allowed characters are: lowercase and uppercase letters, numbers,
# hyphen, single-quote, double-quote, space, and exclamation point.
# Example: <code>My Project</code>
# Read-write.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
@project_id = args[:project_id] if args.key?(:project_id)
@lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
@project_number = args[:project_number] if args.key?(:project_number)
@parent = args[:parent] if args.key?(:parent)
@labels = args[:labels] if args.key?(:labels)
@create_time = args[:create_time] if args.key?(:create_time)
@name = args[:name] if args.key?(:name)
end
end
@ -677,6 +255,428 @@ module Google
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# A classification of the Folder Operation error.
class FolderOperationError
include Google::Apis::Core::Hashable
# The type of operation error experienced.
# Corresponds to the JSON property `errorMessageId`
# @return [String]
attr_accessor :error_message_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_message_id = args[:error_message_id] if args.key?(:error_message_id)
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
# **Example**
# `
# "bindings": [
# `
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# `,
# `
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# `
# ]
# `
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
class Policy
include Google::Apis::Core::Hashable
# `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the
# read-modify-write cycle to perform policy updates in order to avoid race
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten blindly.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Version of the `Policy`. The default version is 0.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
# Associates a list of `members` to a `role`.
# Multiple `bindings` must not be specified for the same `role`.
# `bindings` with no members will result in an error.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Binding>]
attr_accessor :bindings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] if args.key?(:etag)
@version = args[:version] if args.key?(:version)
@bindings = args[:bindings] if args.key?(:bindings)
end
end
# Metadata describing a long running folder operation
class FolderOperation
include Google::Apis::Core::Hashable
# The type of this operation.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
# The display name of the folder.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# The resource name of the folder's parent.
# Only applicable when the operation_type is MOVE.
# Corresponds to the JSON property `sourceParent`
# @return [String]
attr_accessor :source_parent
# The resource name of the folder or organization we are either creating
# the folder under or moving the folder to.
# Corresponds to the JSON property `destinationParent`
# @return [String]
attr_accessor :destination_parent
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operation_type = args[:operation_type] if args.key?(:operation_type)
@display_name = args[:display_name] if args.key?(:display_name)
@source_parent = args[:source_parent] if args.key?(:source_parent)
@destination_parent = args[:destination_parent] if args.key?(:destination_parent)
end
end
# A container to reference an id for any resource type. A `resource` in Google
# Cloud Platform is a generic term for something you (a developer) may want to
# interact with through one of our API's. Some examples are an AppEngine app,
# a Compute Engine instance, a Cloud SQL database, and so on.
class ResourceId
include Google::Apis::Core::Hashable
# Required field representing the resource type this id is for.
# At present, the valid types are "project" and "organization".
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# Required field for the type-specific id. This should correspond to the id
# used in the type-specific API's.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
@id = args[:id] if args.key?(:id)
end
end
# Identifying information for a single ancestor of a project.
class Ancestor
include Google::Apis::Core::Hashable
# A container to reference an id for any resource type. A `resource` in Google
# Cloud Platform is a generic term for something you (a developer) may want to
# interact with through one of our API's. Some examples are an AppEngine app,
# a Compute Engine instance, a Cloud SQL database, and so on.
# Corresponds to the JSON property `resourceId`
# @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId]
attr_accessor :resource_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource_id = args[:resource_id] if args.key?(:resource_id)
end
end
# The response returned from the `ListOrganizations` method.
class ListOrganizationsResponse
include Google::Apis::Core::Hashable
# A pagination token to be used to retrieve the next page of results. If the
# result is too large to fit within the page size specified in the request,
# this field will be set with a token that can be used to fetch the next page
# of results. If this field is empty, it indicates that this response
# contains the last page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The list of Organizations that matched the list query, possibly paginated.
# Corresponds to the JSON property `organizations`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Organization>]
attr_accessor :organizations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@organizations = args[:organizations] if args.key?(:organizations)
end
end
# Request message for `SetIamPolicy` method.
class SetIamPolicyRequest
include Google::Apis::Core::Hashable
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
# **Example**
# `
# "bindings": [
# `
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# `,
# `
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# `
# ]
# `
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
attr_accessor :policy
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@policy = args[:policy] if args.key?(:policy)
end
end
# Associates `members` with a `role`.
class Binding
include Google::Apis::Core::Hashable
# Specifies the identities requesting access for a Cloud Platform resource.
# `members` can have the following values:
# * `allUsers`: A special identifier that represents anyone who is
# on the internet; with or without a Google account.
# * `allAuthenticatedUsers`: A special identifier that represents anyone
# who is authenticated with a Google account or a service account.
# * `user:`emailid``: An email address that represents a specific Google
# account. For example, `alice@gmail.com` or `joe@example.com`.
# * `serviceAccount:`emailid``: An email address that represents a service
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
# * `group:`emailid``: An email address that represents a Google group.
# For example, `admins@example.com`.
# * `domain:`domain``: A Google Apps domain name that represents all the
# users of that domain. For example, `google.com` or `example.com`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The request sent to the UndeleteProject
# method.
class UndeleteProjectRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The root node in the resource hierarchy to which a particular entity's
# (e.g., company) resources belong.
class Organization
include Google::Apis::Core::Hashable
# The entity that owns an Organization. The lifetime of the Organization and
# all of its descendants are bound to the `OrganizationOwner`. If the
# `OrganizationOwner` is deleted, the Organization and all its descendants will
# be deleted.
# Corresponds to the JSON property `owner`
# @return [Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner]
attr_accessor :owner
# Output Only. The resource name of the organization. This is the
# organization's relative path in the API. Its format is
# "organizations/[organization_id]". For example, "organizations/1234".
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# An immutable id for the Organization that is assigned on creation. This
# should be omitted when creating a new Organization.
# This field is read-only.
# This field is deprecated and will be removed in v1. Use name instead.
# Corresponds to the JSON property `organizationId`
# @return [String]
attr_accessor :organization_id
# The organization's current lifecycle state. Assigned by the server.
# @OutputOnly
# Corresponds to the JSON property `lifecycleState`
# @return [String]
attr_accessor :lifecycle_state
# A friendly string to be used to refer to the Organization in the UI.
# Assigned by the server, set to the primary domain of the G Suite
# customer that owns the organization.
# @OutputOnly
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Timestamp when the Organization was created. Assigned by the server.
# @OutputOnly
# Corresponds to the JSON property `creationTime`
# @return [String]
attr_accessor :creation_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@owner = args[:owner] if args.key?(:owner)
@name = args[:name] if args.key?(:name)
@organization_id = args[:organization_id] if args.key?(:organization_id)
@lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
@display_name = args[:display_name] if args.key?(:display_name)
@creation_time = args[:creation_time] if args.key?(:creation_time)
end
end
# A status object which is used as the `metadata` field for the Operation
# returned by CreateProject. It provides insight for when significant phases of
# Project creation have completed.
class ProjectCreationStatus
include Google::Apis::Core::Hashable
# True if the project creation process is complete.
# Corresponds to the JSON property `ready`
# @return [Boolean]
attr_accessor :ready
alias_method :ready?, :ready
# Creation time of the project creation workflow.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# True if the project can be retrieved using GetProject. No other operations
# on the project are guaranteed to work until the project creation is
# complete.
# Corresponds to the JSON property `gettable`
# @return [Boolean]
attr_accessor :gettable
alias_method :gettable?, :gettable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ready = args[:ready] if args.key?(:ready)
@create_time = args[:create_time] if args.key?(:create_time)
@gettable = args[:gettable] if args.key?(:gettable)
end
end
end
end
end

View File

@ -22,78 +22,6 @@ module Google
module Apis
module CloudresourcemanagerV1beta1
class FolderOperationError
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FolderOperation
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 ResourceId
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Ancestor
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 ListOrganizationsResponse
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 Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UndeleteProjectRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Organization
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ProjectCreationStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -143,105 +71,75 @@ module Google
end
class FolderOperationError
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :error_message_id, as: 'errorMessageId'
end
end
class Representation < Google::Apis::Core::JsonRepresentation; end
class FolderOperation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :operation_type, as: 'operationType'
property :display_name, as: 'displayName'
property :source_parent, as: 'sourceParent'
property :destination_parent, as: 'destinationParent'
end
include Google::Apis::Core::JsonObjectSupport
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
end
include Google::Apis::Core::JsonObjectSupport
end
class FolderOperation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ResourceId
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :id, as: 'id'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Ancestor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1beta1::Policy, decorator: Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
end
include Google::Apis::Core::JsonObjectSupport
end
class ListOrganizationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1beta1::Organization, decorator: Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
include Google::Apis::Core::JsonObjectSupport
end
class SetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :members, as: 'members'
property :role, as: 'role'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UndeleteProjectRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Organization
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :organization_id, as: 'organizationId'
property :lifecycle_state, as: 'lifecycleState'
property :display_name, as: 'displayName'
property :creation_time, as: 'creationTime'
property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
property :name, as: 'name'
end
include Google::Apis::Core::JsonObjectSupport
end
class ProjectCreationStatus
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :gettable, as: 'gettable'
property :ready, as: 'ready'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetIamPolicyRequest
@ -290,14 +188,14 @@ module Google
class Project
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
hash :labels, as: 'labels'
property :name, as: 'name'
property :project_id, as: 'projectId'
property :lifecycle_state, as: 'lifecycleState'
property :project_number, as: 'projectNumber'
property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation
hash :labels, as: 'labels'
property :create_time, as: 'createTime'
property :name, as: 'name'
end
end
@ -307,6 +205,108 @@ module Google
collection :permissions, as: 'permissions'
end
end
class FolderOperationError
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :error_message_id, as: 'errorMessageId'
end
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation
end
end
class FolderOperation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :operation_type, as: 'operationType'
property :display_name, as: 'displayName'
property :source_parent, as: 'sourceParent'
property :destination_parent, as: 'destinationParent'
end
end
class ResourceId
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :id, as: 'id'
end
end
class Ancestor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation
end
end
class ListOrganizationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1beta1::Organization, decorator: Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
end
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1beta1::Policy, decorator: Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
end
end
class Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :members, as: 'members'
property :role, as: 'role'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class UndeleteProjectRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Organization
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner::Representation
property :name, as: 'name'
property :organization_id, as: 'organizationId'
property :lifecycle_state, as: 'lifecycleState'
property :display_name, as: 'displayName'
property :creation_time, as: 'creationTime'
end
end
class ProjectCreationStatus
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ready, as: 'ready'
property :create_time, as: 'createTime'
property :gettable, as: 'gettable'
end
end
end
end
end

View File

@ -47,161 +47,212 @@ module Google
super('https://cloudresourcemanager.googleapis.com/', '')
end
# Retrieves the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# The caller must have read permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `my-project-123`).
# Required.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Lists Organization resources that are visible to the user and satisfy
# the specified filter. This method returns Organizations in an unspecified
# order. New Organizations do not necessarily appear at the end of the list.
# @param [String] page_token
# A pagination token returned from a previous call to `ListOrganizations`
# that indicates from where listing should continue.
# This field is optional.
# @param [Fixnum] page_size
# The maximum number of Organizations to return in the response.
# This field is optional.
# @param [String] filter
# An optional query string used to filter the Organizations to return in
# the response. Filter rules are case-insensitive.
# Organizations may be filtered by `owner.directoryCustomerId` or by
# `domain`, where the domain is a Google for Work domain, for example:
# |Filter|Description|
# |------|-----------|
# |owner.directorycustomerid:123456789|Organizations with `owner.
# directory_customer_id` equal to `123456789`.|
# |domain:google.com|Organizations corresponding to the domain `google.com`.|
# This field is optional.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
# @return [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse]
#
# @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(project_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
def list_organizations(page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/organizations', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Restores the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# You can only use this method for a Project that has a lifecycle state of
# DELETE_REQUESTED.
# After deletion starts, the Project cannot be restored.
# The caller must have modify permissions for this Project.
# @param [String] project_id
# The project ID (for example, `foo-bar-123`).
# Required.
# @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Sets the access control policy on an Organization resource. Replaces any
# existing policy. The `resource` field should be the organization's resource
# name, e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
# @return [Google::Apis::CloudresourcemanagerV1beta1::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 undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation
command.request_object = undelete_project_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets a list of ancestors in the resource hierarchy for the Project
# identified by the specified `project_id` (for example, `my-project-123`).
# The caller must have read permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `my-project-123`).
# Required.
# @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Gets the access control policy for an Organization resource. May be empty
# if no such policy or resource exists. The `resource` field should be the
# organization's resource name, e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] parsed result object
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse]
# @return [Google::Apis::CloudresourcemanagerV1beta1::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_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation
command.request_object = get_ancestry_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Updates the attributes of the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# The caller must have modify permissions for this Project.
# @param [String] project_id
# The project ID (for example, `my-project-123`).
# Required.
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Fetches an Organization resource identified by the specified resource name.
# @param [String] name
# The resource name of the Organization to fetch, e.g. "organizations/1234".
# @param [String] organization_id
# The id of the Organization resource to fetch.
# This field is deprecated and will be removed in v1. Use name instead.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
# @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.request_object = project_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
def get_organization(name, organization_id: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
command.params['name'] = name unless name.nil?
command.query['organizationId'] = organization_id unless organization_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Returns permissions that a caller has on the specified Project.
# Updates an Organization resource identified by the specified resource name.
# @param [String] name
# Output Only. The resource name of the organization. This is the
# organization's relative path in the API. Its format is
# "organizations/[organization_id]". For example, "organizations/1234".
# @param [Google::Apis::CloudresourcemanagerV1beta1::Organization] organization_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_organization(name, organization_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
command.request_object = organization_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Returns permissions that a caller has on the specified Organization.
# The `resource` field should be the organization's resource name,
# e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -214,15 +265,15 @@ 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 test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options)
def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse
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['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -248,11 +299,11 @@ module Google
# @param [String] project_id
# The Project ID (for example, `foo-bar-123`).
# Required.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -265,24 +316,19 @@ 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 delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
def delete_project(project_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1beta1/projects/{projectId}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists Projects that are visible to the user and satisfy the
# specified filter. This method returns Projects in an unspecified order.
# New Projects do not necessarily appear at the end of the list.
# @param [Fixnum] page_size
# The maximum number of Projects to return in the response.
# The server can return fewer Projects than requested.
# If unspecified, server picks an appropriate default.
# Optional.
# @param [String] filter
# An expression for filtering the results of the request. Filter rules are
# case insensitive. The fields eligible for filtering are:
@ -305,11 +351,16 @@ module Google
# A pagination token returned from a previous call to ListProjects
# that indicates from where listing should continue.
# Optional.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Fixnum] page_size
# The maximum number of Projects to return in the response.
# The server can return fewer Projects than requested.
# If unspecified, server picks an appropriate default.
# Optional.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -322,53 +373,15 @@ 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 list_projects(page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_projects(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/projects', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a Project resource.
# Initially, the Project resource is owned by its creator exclusively.
# The creator can later grant permission to others to read or update the
# Project.
# Several APIs are activated automatically for the Project, including
# Google Cloud Storage.
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
# @param [Boolean] use_legacy_stack
# A safety hatch to opt out of the new reliable project creation process.
# @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::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
#
# @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(project_object = nil, use_legacy_stack: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.request_object = project_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.query['useLegacyStack'] = use_legacy_stack unless use_legacy_stack.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -403,11 +416,11 @@ module Google
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -420,15 +433,53 @@ 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 set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def set_project_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects/{resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
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['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Creates a Project resource.
# Initially, the Project resource is owned by its creator exclusively.
# The creator can later grant permission to others to read or update the
# Project.
# Several APIs are activated automatically for the Project, including
# Google Cloud Storage.
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
# @param [Boolean] use_legacy_stack
# A safety hatch to opt out of the new reliable project creation process.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
#
# @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(project_object = nil, use_legacy_stack: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.request_object = project_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.query['useLegacyStack'] = use_legacy_stack unless use_legacy_stack.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -439,11 +490,11 @@ module Google
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -456,224 +507,173 @@ 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 get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def get_project_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects/{resource}:getIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
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['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists Organization resources that are visible to the user and satisfy
# the specified filter. This method returns Organizations in an unspecified
# order. New Organizations do not necessarily appear at the end of the list.
# @param [String] filter
# An optional query string used to filter the Organizations to return in
# the response. Filter rules are case-insensitive.
# Organizations may be filtered by `owner.directoryCustomerId` or by
# `domain`, where the domain is a Google for Work domain, for example:
# |Filter|Description|
# |------|-----------|
# |owner.directorycustomerid:123456789|Organizations with `owner.
# directory_customer_id` equal to `123456789`.|
# |domain:google.com|Organizations corresponding to the domain `google.com`.|
# This field is optional.
# @param [String] page_token
# A pagination token returned from a previous call to `ListOrganizations`
# that indicates from where listing should continue.
# This field is optional.
# @param [Fixnum] page_size
# The maximum number of Organizations to return in the response.
# This field is optional.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Retrieves the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# The caller must have read permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `my-project-123`).
# Required.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse] parsed result object
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse]
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
#
# @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_organizations(filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/organizations', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['fields'] = fields unless fields.nil?
def get_project(project_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Sets the access control policy on an Organization resource. Replaces any
# existing policy. The `resource` field should be the organization's resource
# name, e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Restores the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# You can only use this method for a Project that has a lifecycle state of
# DELETE_REQUESTED.
# After deletion starts, the Project cannot be restored.
# The caller must have modify permissions for this Project.
# @param [String] project_id
# The project ID (for example, `foo-bar-123`).
# Required.
# @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
# @return [Google::Apis::CloudresourcemanagerV1beta1::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_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
def undelete_project(project_id, undelete_project_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation
command.request_object = undelete_project_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets the access control policy for an Organization resource. May be empty
# if no such policy or resource exists. The `resource` field should be the
# organization's resource name, e.g. "organizations/123".
# @param [String] resource
# REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Updates the attributes of the Project identified by the specified
# `project_id` (for example, `my-project-123`).
# The caller must have modify permissions for this Project.
# @param [String] project_id
# The project ID (for example, `my-project-123`).
# Required.
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
#
# @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_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
def update_project(project_id, project_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.request_object = project_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Fetches an Organization resource identified by the specified resource name.
# @param [String] name
# The resource name of the Organization to fetch, e.g. "organizations/1234".
# @param [String] organization_id
# The id of the Organization resource to fetch.
# This field is deprecated and will be removed in v1. Use name instead.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Gets a list of ancestors in the resource hierarchy for the Project
# identified by the specified `project_id` (for example, `my-project-123`).
# The caller must have read permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `my-project-123`).
# Required.
# @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
# @return [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse]
#
# @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_organization(name, organization_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
command.params['name'] = name unless name.nil?
command.query['organizationId'] = organization_id unless organization_id.nil?
command.query['fields'] = fields unless fields.nil?
def get_project_ancestry(project_id, get_ancestry_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation
command.request_object = get_ancestry_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Updates an Organization resource identified by the specified resource name.
# @param [String] name
# Output Only. The resource name of the organization. This is the
# organization's relative path in the API. Its format is
# "organizations/[organization_id]". For example, "organizations/1234".
# @param [Google::Apis::CloudresourcemanagerV1beta1::Organization] organization_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::CloudresourcemanagerV1beta1::Organization] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_organization(name, organization_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
command.request_object = organization_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
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 permissions that a caller has on the specified Organization.
# The `resource` field should be the organization's resource name,
# e.g. "organizations/123".
# Returns permissions that a caller has on the specified Project.
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -686,15 +686,15 @@ 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 test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse
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['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end

View File

@ -18,24 +18,24 @@ require 'google/apis/cloudtrace_v1/representations.rb'
module Google
module Apis
# Google Cloud Trace API
# Stackdriver Trace API
#
# Send and retrieve trace data from Google Cloud Trace. Data is generated and
# Send and retrieve trace data from Stackdriver Trace. Data is generated and
# available by default for all App Engine applications. Data from other
# applications can be written to Cloud Trace for display, reporting, and
# applications can be written to Stackdriver Trace for display, reporting, and
# analysis.
#
# @see https://cloud.google.com/tools/cloud-trace
# @see https://cloud.google.com/trace
module CloudtraceV1
VERSION = 'V1'
REVISION = '20160518'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
REVISION = '20170208'
# Write Trace data for a project or application
AUTH_TRACE_APPEND = 'https://www.googleapis.com/auth/trace.append'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# Read Trace data for a project or application
AUTH_TRACE_READONLY = 'https://www.googleapis.com/auth/trace.readonly'
end

View File

@ -22,132 +22,6 @@ module Google
module Apis
module CloudtraceV1
# The response message for the `ListTraces` method.
class ListTracesResponse
include Google::Apis::Core::Hashable
# List of trace records returned.
# Corresponds to the JSON property `traces`
# @return [Array<Google::Apis::CloudtraceV1::Trace>]
attr_accessor :traces
# If defined, indicates that there are more traces that match the request and
# that this value should be passed to the next request to continue retrieving
# additional traces.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@traces = args[:traces] if args.key?(:traces)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# A trace describes how long it takes for an application to perform an operation.
# It consists of a set of spans, each of which represent a single timed event
# within the operation.
class Trace
include Google::Apis::Core::Hashable
# Project ID of the Cloud project where the trace data is stored.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# Globally unique identifier for the trace. This identifier is a 128-bit numeric
# value formatted as a 32-byte hex string.
# Corresponds to the JSON property `traceId`
# @return [String]
attr_accessor :trace_id
# Collection of spans in the trace.
# Corresponds to the JSON property `spans`
# @return [Array<Google::Apis::CloudtraceV1::TraceSpan>]
attr_accessor :spans
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@project_id = args[:project_id] if args.key?(:project_id)
@trace_id = args[:trace_id] if args.key?(:trace_id)
@spans = args[:spans] if args.key?(:spans)
end
end
# A span represents a single timed event within a trace. Spans can be nested and
# form a trace tree. Often, a trace contains a root span that describes the end-
# to-end latency of an operation and, optionally, one or more subspans for its
# suboperations. Spans do not need to be contiguous. There may be gaps between
# spans in a trace.
class TraceSpan
include Google::Apis::Core::Hashable
# Identifier for the span. This identifier must be unique within a trace.
# Corresponds to the JSON property `spanId`
# @return [String]
attr_accessor :span_id
# Distinguishes between spans generated in a particular context. For example,
# two spans with the same name may be distinguished using `RPC_CLIENT` and `
# RPC_SERVER` to identify queueing latency associated with the span.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of the trace. The trace name is sanitized and displayed in the
# Stackdriver Trace tool in the `% dynamic print site_values.console_name %`.
# The name may be a method name or some other per-call site name. For the same
# executable and the same call point, a best practice is to use a consistent
# name, which makes it easier to correlate cross-trace spans.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Start time of the span in nanoseconds from the UNIX epoch.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# End time of the span in nanoseconds from the UNIX epoch.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
# ID of the parent span, if any. Optional.
# Corresponds to the JSON property `parentSpanId`
# @return [String]
attr_accessor :parent_span_id
# Collection of labels associated with the span.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@span_id = args[:span_id] if args.key?(:span_id)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@start_time = args[:start_time] if args.key?(:start_time)
@end_time = args[:end_time] if args.key?(:end_time)
@parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id)
@labels = args[:labels] if args.key?(:labels)
end
end
# List of new or updated traces.
class Traces
include Google::Apis::Core::Hashable
@ -167,11 +41,109 @@ module Google
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance: service Foo ` rpc Bar(google.
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
# `Empty` is empty JSON object ````.
# A span represents a single timed event within a trace. Spans can be nested
# and form a trace tree. Often, a trace contains a root span that describes the
# end-to-end latency of an operation and, optionally, one or more subspans for
# its suboperations. Spans do not need to be contiguous. There may be gaps
# between spans in a trace.
class TraceSpan
include Google::Apis::Core::Hashable
# End time of the span in nanoseconds from the UNIX epoch.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
# Start time of the span in nanoseconds from the UNIX epoch.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# Distinguishes between spans generated in a particular context. For example,
# two spans with the same name may be distinguished using `RPC_CLIENT`
# and `RPC_SERVER` to identify queueing latency associated with the span.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Collection of labels associated with the span. Label keys must be less than
# 128 bytes. Label values must be less than 16 kilobytes.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Name of the span. Must be less than 128 bytes. The span name is sanitized
# and displayed in the Stackdriver Trace tool in the
# `% dynamic print site_values.console_name %`.
# The name may be a method name or some other per-call site name.
# For the same executable and the same call point, a best practice is
# to use a consistent name, which makes it easier to correlate
# cross-trace spans.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Identifier for the span. Must be a 64-bit integer other than 0 and
# unique within a trace.
# Corresponds to the JSON property `spanId`
# @return [String]
attr_accessor :span_id
# ID of the parent span, if any. Optional.
# Corresponds to the JSON property `parentSpanId`
# @return [String]
attr_accessor :parent_span_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@end_time = args[:end_time] if args.key?(:end_time)
@start_time = args[:start_time] if args.key?(:start_time)
@kind = args[:kind] if args.key?(:kind)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
@span_id = args[:span_id] if args.key?(:span_id)
@parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id)
end
end
# The response message for the `ListTraces` method.
class ListTracesResponse
include Google::Apis::Core::Hashable
# List of trace records returned.
# Corresponds to the JSON property `traces`
# @return [Array<Google::Apis::CloudtraceV1::Trace>]
attr_accessor :traces
# If defined, indicates that there are more traces that match the request
# and that this value should be passed to the next request to continue
# retrieving additional traces.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@traces = args[:traces] if args.key?(:traces)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
@ -183,6 +155,40 @@ module Google
def update!(**args)
end
end
# A trace describes how long it takes for an application to perform an
# operation. It consists of a set of spans, each of which represent a single
# timed event within the operation.
class Trace
include Google::Apis::Core::Hashable
# Project ID of the Cloud project where the trace data is stored.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# Collection of spans in the trace.
# Corresponds to the JSON property `spans`
# @return [Array<Google::Apis::CloudtraceV1::TraceSpan>]
attr_accessor :spans
# Globally unique identifier for the trace. This identifier is a 128-bit
# numeric value formatted as a 32-byte hex string.
# Corresponds to the JSON property `traceId`
# @return [String]
attr_accessor :trace_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@project_id = args[:project_id] if args.key?(:project_id)
@spans = args[:spans] if args.key?(:spans)
@trace_id = args[:trace_id] if args.key?(:trace_id)
end
end
end
end
end

View File

@ -22,13 +22,7 @@ module Google
module Apis
module CloudtraceV1
class ListTracesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Trace
class Traces
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -40,7 +34,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Traces
class ListTracesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -52,6 +46,33 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Trace
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Traces
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :traces, as: 'traces', class: Google::Apis::CloudtraceV1::Trace, decorator: Google::Apis::CloudtraceV1::Trace::Representation
end
end
class TraceSpan
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end_time, as: 'endTime'
property :start_time, as: 'startTime'
property :kind, as: 'kind'
hash :labels, as: 'labels'
property :name, as: 'name'
property :span_id, as: 'spanId'
property :parent_span_id, as: 'parentSpanId'
end
end
class ListTracesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -61,42 +82,21 @@ module Google
end
end
class Trace
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :project_id, as: 'projectId'
property :trace_id, as: 'traceId'
collection :spans, as: 'spans', class: Google::Apis::CloudtraceV1::TraceSpan, decorator: Google::Apis::CloudtraceV1::TraceSpan::Representation
end
end
class TraceSpan
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :span_id, as: 'spanId'
property :kind, as: 'kind'
property :name, as: 'name'
property :start_time, as: 'startTime'
property :end_time, as: 'endTime'
property :parent_span_id, as: 'parentSpanId'
hash :labels, as: 'labels'
end
end
class Traces
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :traces, as: 'traces', class: Google::Apis::CloudtraceV1::Trace, decorator: Google::Apis::CloudtraceV1::Trace::Representation
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Trace
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :project_id, as: 'projectId'
collection :spans, as: 'spans', class: Google::Apis::CloudtraceV1::TraceSpan, decorator: Google::Apis::CloudtraceV1::TraceSpan::Representation
property :trace_id, as: 'traceId'
end
end
end
end
end

View File

@ -20,11 +20,11 @@ require 'google/apis/errors'
module Google
module Apis
module CloudtraceV1
# Google Cloud Trace API
# Stackdriver Trace API
#
# Send and retrieve trace data from Google Cloud Trace. Data is generated and
# Send and retrieve trace data from Stackdriver Trace. Data is generated and
# available by default for all App Engine applications. Data from other
# applications can be written to Cloud Trace for display, reporting, and
# applications can be written to Stackdriver Trace for display, reporting, and
# analysis.
#
# @example
@ -33,7 +33,7 @@ module Google
# Cloudtrace = Google::Apis::CloudtraceV1 # Alias the module
# service = Cloudtrace::CloudTraceService.new
#
# @see https://cloud.google.com/tools/cloud-trace
# @see https://cloud.google.com/trace
class CloudTraceService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
@ -49,11 +49,11 @@ module Google
super('https://cloudtrace.googleapis.com/', '')
end
# Sends new traces to Stackdriver Trace or updates existing traces. If the ID of
# a trace that you send matches that of an existing trace, any fields in the
# existing trace and its spans are overwritten by the provided values, and any
# new fields provided are merged with the existing trace data. If the ID does
# not match, a new trace is created.
# Sends new traces to Stackdriver Trace or updates existing traces. If the ID
# of a trace that you send matches that of an existing trace, any fields
# in the existing trace and its spans are overwritten by the provided values,
# and any new fields provided are merged with the existing trace data. If the
# ID does not match, a new trace is created.
# @param [String] project_id
# ID of the Cloud project where the trace data is stored.
# @param [Google::Apis::CloudtraceV1::Traces] traces_object
@ -89,30 +89,35 @@ module Google
# Returns of a list of traces that match the specified filter conditions.
# @param [String] project_id
# ID of the Cloud project where the trace data is stored.
# @param [String] view
# Type of data returned for traces in the list. Optional. Default is `MINIMAL`.
# @param [Fixnum] page_size
# Maximum number of traces to return. If not specified or <= 0, the
# implementation selects a reasonable value. The implementation may return fewer
# traces than the requested page size. Optional.
# @param [String] page_token
# Token identifying the page of results to return. If provided, use the value of
# the `next_page_token` field from a previous request. Optional.
# @param [String] start_time
# End of the time interval (inclusive) during which the trace data was collected
# from the application.
# @param [String] filter
# An optional filter for the request.
# @param [String] end_time
# Start of the time interval (inclusive) during which the trace data was
# collected from the application.
# @param [String] filter
# An optional filter for the request.
# @param [String] start_time
# End of the time interval (inclusive) during which the trace data was
# collected from the application.
# @param [String] page_token
# Token identifying the page of results to return. If provided, use the
# value of the `next_page_token` field from a previous request. Optional.
# @param [Fixnum] page_size
# Maximum number of traces to return. If not specified or <= 0, the
# implementation selects a reasonable value. The implementation may
# return fewer traces than the requested page size. Optional.
# @param [String] view
# Type of data returned for traces in the list. Optional. Default is
# `MINIMAL`.
# @param [String] order_by
# Field used to sort the returned traces. Optional. Can be one of the following:
# * `trace_id` * `name` (`name` field of root span in the trace) * `duration` (
# difference between `end_time` and `start_time` fields of the root span) * `
# start` (`start_time` field of the root span) Descending order can be specified
# by appending `desc` to the sort field (for example, `name desc`). Only one
# sort field is permitted.
# Field used to sort the returned traces. Optional.
# Can be one of the following:
# * `trace_id`
# * `name` (`name` field of root span in the trace)
# * `duration` (difference between `end_time` and `start_time` fields of
# the root span)
# * `start` (`start_time` field of the root span)
# Descending order can be specified by appending `desc` to the sort field
# (for example, `name desc`).
# Only one sort field is permitted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -130,17 +135,17 @@ 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 list_project_traces(project_id, view: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil, filter: nil, order_by: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_traces(project_id, filter: nil, end_time: nil, start_time: nil, page_token: nil, page_size: nil, view: nil, order_by: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/traces', options)
command.response_representation = Google::Apis::CloudtraceV1::ListTracesResponse::Representation
command.response_class = Google::Apis::CloudtraceV1::ListTracesResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['view'] = view unless view.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['filter'] = filter unless filter.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['view'] = view unless view.nil?
command.query['orderBy'] = order_by unless order_by.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?

View File

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

View File

@ -22,6 +22,287 @@ module Google
module Apis
module ComputeBeta
# A specification of the type and number of accelerator cards attached to the
# instance.
class AcceleratorConfig
include Google::Apis::Core::Hashable
# The number of the guest accelerator cards exposed to this instance.
# Corresponds to the JSON property `acceleratorCount`
# @return [Fixnum]
attr_accessor :accelerator_count
# Full or partial URL of the accelerator type resource to expose to this
# instance.
# Corresponds to the JSON property `acceleratorType`
# @return [String]
attr_accessor :accelerator_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count)
@accelerator_type = args[:accelerator_type] if args.key?(:accelerator_type)
end
end
# An Accelerator Type resource.
class AcceleratorType
include Google::Apis::Core::Hashable
# [Output Only] Creation timestamp in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# Deprecation status for a public resource.
# Corresponds to the JSON property `deprecated`
# @return [Google::Apis::ComputeBeta::DeprecationStatus]
attr_accessor :deprecated
# [Output Only] An optional textual description of the resource.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] The type of the resource. Always compute#acceleratorType for
# accelerator types.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] Maximum accelerator cards allowed per instance.
# Corresponds to the JSON property `maximumCardsPerInstance`
# @return [Fixnum]
attr_accessor :maximum_cards_per_instance
# [Output Only] Name of the resource.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# [Output Only] Server-defined fully-qualified URL for this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# [Output Only] The name of the zone where the accelerator type resides, such as
# us-central1-a.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@deprecated = args[:deprecated] if args.key?(:deprecated)
@description = args[:description] if args.key?(:description)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@maximum_cards_per_instance = args[:maximum_cards_per_instance] if args.key?(:maximum_cards_per_instance)
@name = args[:name] if args.key?(:name)
@self_link = args[:self_link] if args.key?(:self_link)
@zone = args[:zone] if args.key?(:zone)
end
end
#
class AcceleratorTypeAggregatedList
include Google::Apis::Core::Hashable
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] A map of scoped accelerator type lists.
# Corresponds to the JSON property `items`
# @return [Hash<String,Google::Apis::ComputeBeta::AcceleratorTypesScopedList>]
attr_accessor :items
# [Output Only] Type of resource. Always compute#acceleratorTypeAggregatedList
# for aggregated lists of accelerator types.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] This token allows you to get the next page of results for list
# requests. If the number of results is larger than maxResults, use the
# nextPageToken as a value for the query parameter pageToken in the next list
# request. Subsequent list requests will have their own nextPageToken to
# continue paging through the results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# [Output Only] Server-defined URL for this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
# Contains a list of accelerator types.
class AcceleratorTypeList
include Google::Apis::Core::Hashable
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# A list of AcceleratorType resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ComputeBeta::AcceleratorType>]
attr_accessor :items
# [Output Only] Type of resource. Always compute#acceleratorTypeList for lists
# of accelerator types.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] A token used to continue a truncated list request.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# [Output Only] Server-defined URL for this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
#
class AcceleratorTypesScopedList
include Google::Apis::Core::Hashable
# [Output Only] List of accelerator types contained in this scope.
# Corresponds to the JSON property `acceleratorTypes`
# @return [Array<Google::Apis::ComputeBeta::AcceleratorType>]
attr_accessor :accelerator_types
# [Output Only] An informational warning that appears when the accelerator types
# list is empty.
# Corresponds to the JSON property `warning`
# @return [Google::Apis::ComputeBeta::AcceleratorTypesScopedList::Warning]
attr_accessor :warning
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@accelerator_types = args[:accelerator_types] if args.key?(:accelerator_types)
@warning = args[:warning] if args.key?(:warning)
end
# [Output Only] An informational warning that appears when the accelerator types
# list is empty.
class Warning
include Google::Apis::Core::Hashable
# [Output Only] A warning code, if applicable. For example, Compute Engine
# returns NO_RESULTS_ON_PAGE if there are no results in the response.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# [Output Only] Metadata about this warning in key: value format. For example:
# "data": [ ` "key": "scope", "value": "zones/us-east1-d" `
# Corresponds to the JSON property `data`
# @return [Array<Google::Apis::ComputeBeta::AcceleratorTypesScopedList::Warning::Datum>]
attr_accessor :data
# [Output Only] A human-readable description of the warning code.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] if args.key?(:code)
@data = args[:data] if args.key?(:data)
@message = args[:message] if args.key?(:message)
end
#
class Datum
include Google::Apis::Core::Hashable
# [Output Only] A key that provides more detail on the warning being returned.
# For example, for warnings where there are no results in a list request for a
# particular zone, this key might be scope and the key value might be the zone
# name. Other examples might be a key indicating a deprecated resource and a
# suggested replacement, or a warning about invalid network settings (for
# example, if an instance attempts to perform IP forwarding but is not enabled
# for IP forwarding).
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# [Output Only] A warning data value corresponding to the key.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] if args.key?(:key)
@value = args[:value] if args.key?(:value)
end
end
end
end
# An access configuration attached to an instance's network interface. Only one
# access config per instance is supported.
class AccessConfig
@ -533,18 +814,20 @@ module Google
end
end
# Provides the configuration for non-admin_activity logging for a service.
# Controls exemptions and specific log sub-types.
# Specifies the audit configuration for a service. It consists of which
# permission types are logged, and what identities, if any, are exempted from
# logging. An AuditConifg must have one or more AuditLogConfigs.
class AuditConfig
include Google::Apis::Core::Hashable
# The configuration for each type of logging
# The configuration for logging of each type of permission.
# Corresponds to the JSON property `auditLogConfigs`
# @return [Array<Google::Apis::ComputeBeta::AuditLogConfig>]
attr_accessor :audit_log_configs
# Specifies the identities that are exempted from "data access" audit logging
# for the `service` specified above. Follows the same format of Binding.members.
# This field is deprecated in favor of per-permission-type exemptions.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
@ -568,12 +851,16 @@ module Google
end
end
# Provides the configuration for a sub-type of logging.
# Provides the configuration for logging a type of permissions. Example:
# ` "audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "
# user:foo@gmail.com" ] `, ` "log_type": "DATA_WRITE", ` ] `
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.
# com from DATA_READ logging.
class AuditLogConfig
include Google::Apis::Core::Hashable
# Specifies the identities that are exempted from this type of logging Follows
# the same format of Binding.members.
# Specifies the identities that do not cause logging for this type of permission.
# Follows the same format of [Binding.members][].
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
@ -2284,13 +2571,12 @@ module Google
class DiskList
include Google::Apis::Core::Hashable
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] A list of persistent disks.
# A list of Disk resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ComputeBeta::Disk>]
attr_accessor :items
@ -2300,11 +2586,7 @@ module Google
# @return [String]
attr_accessor :kind
# [Output Only] This token allows you to get the next page of results for list
# requests. If the number of results is larger than maxResults, use the
# nextPageToken as a value for the query parameter pageToken in the next list
# request. Subsequent list requests will have their own nextPageToken to
# continue paging through the results.
# [Output Only] A token used to continue a truncated list request.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
@ -2931,7 +3213,7 @@ module Google
include Google::Apis::Core::Hashable
# The IP address that this forwarding rule is serving on behalf of.
# For global forwarding rules, the address must be a global IP; for regional
# For global forwarding rules, the address must be a global IP. For regional
# forwarding rules, the address must live in the same region as the forwarding
# rule. By default, this field is empty and an ephemeral IP from the same scope (
# global or regional) will be assigned.
@ -2946,7 +3228,7 @@ module Google
# The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP,
# AH, SCTP or ICMP.
# When the load balancing scheme is INTERNAL</code, only TCP and UDP are valid.
# When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
# Corresponds to the JSON property `IPProtocol`
# @return [String]
attr_accessor :ip_protocol
@ -2982,10 +3264,10 @@ module Google
attr_accessor :kind
# This signifies what the ForwardingRule will be used for and can only take the
# following values: INTERNAL EXTERNAL The value of INTERNAL means that this will
# be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL
# means that this will be used for External Load Balancing (HTTP(S) LB, External
# TCP/UDP LB, SSL Proxy)
# following values: INTERNAL, EXTERNAL The value of INTERNAL means that this
# will be used for Internal Network Load Balancing (TCP, UDP). The value of
# EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB,
# External TCP/UDP LB, SSL Proxy)
# Corresponds to the JSON property `loadBalancingScheme`
# @return [String]
attr_accessor :load_balancing_scheme
@ -4289,6 +4571,11 @@ module Google
# @return [Array<Google::Apis::ComputeBeta::AttachedDisk>]
attr_accessor :disks
#
# Corresponds to the JSON property `guestAccelerators`
# @return [Array<Google::Apis::ComputeBeta::AcceleratorConfig>]
attr_accessor :guest_accelerators
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
@ -4407,6 +4694,7 @@ module Google
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@disks = args[:disks] if args.key?(:disks)
@guest_accelerators = args[:guest_accelerators] if args.key?(:guest_accelerators)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint)
@ -6008,6 +6296,25 @@ module Google
end
end
#
class InstancesSetMachineResourcesRequest
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `guestAccelerators`
# @return [Array<Google::Apis::ComputeBeta::AcceleratorConfig>]
attr_accessor :guest_accelerators
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@guest_accelerators = args[:guest_accelerators] if args.key?(:guest_accelerators)
end
end
#
class InstancesSetMachineTypeRequest
include Google::Apis::Core::Hashable
@ -6737,6 +7044,11 @@ module Google
# @return [String]
attr_accessor :name
# [Output Only] List of network peerings for the resource.
# Corresponds to the JSON property `peerings`
# @return [Array<Google::Apis::ComputeBeta::NetworkPeering>]
attr_accessor :peerings
# [Output Only] Server-defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
@ -6762,6 +7074,7 @@ module Google
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@peerings = args[:peerings] if args.key?(:peerings)
@self_link = args[:self_link] if args.key?(:self_link)
@subnetworks = args[:subnetworks] if args.key?(:subnetworks)
end
@ -6790,10 +7103,12 @@ module Google
# @return [String]
attr_accessor :name
# URL of the network resource for this instance. This is required for creating
# an instance but optional when creating a firewall rule. If not specified when
# creating a firewall rule, the default network is used:
# global/networks/default
# URL of the network resource for this instance. When creating an instance, if
# neither the network nor the subnetwork is specified, the default network
# global/networks/default is used; if the network is not specified but the
# subnetwork is specified, the network is inferred.
# This field is optional when creating a firewall rule. If not specified when
# creating a firewall rule, the default network global/networks/default is used.
# If you specify this property, you can specify the network as a full or partial
# URL. For example, the following are all valid URLs:
# - https://www.googleapis.com/compute/v1/projects/project/global/networks/
@ -6888,6 +7203,63 @@ module Google
end
end
# A network peering attached to a network resource. The message includes the
# peering name, peer network, peering state, and a flag indicating whether
# Google Compute Engine should automatically create routes for the peering.
class NetworkPeering
include Google::Apis::Core::Hashable
# Whether full mesh connectivity is created and managed automatically. When it
# is set to true, Google Compute Engine will automatically create and manage the
# routes between two networks when the state is ACTIVE. Otherwise, user needs to
# create routes manually to route packets to peer network.
# Corresponds to the JSON property `autoCreateRoutes`
# @return [Boolean]
attr_accessor :auto_create_routes
alias_method :auto_create_routes?, :auto_create_routes
# Name of this peering. Provided by the client when the peering is created. The
# name must comply with RFC1035. Specifically, the name must be 1-63 characters
# long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the
# first character must be a lowercase letter, and all the following characters
# must be a dash, lowercase letter, or digit, except the last character, which
# cannot be a dash.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The URL of the peer network. It can be either full URL or partial URL. The
# peer network may belong to a different project. If the partial URL does not
# contain project, it is assumed that the peer network is in the same project as
# the current network.
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
# [Output Only] State for the peering.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# [Output Only] Details about the current state of the peering.
# Corresponds to the JSON property `stateDetails`
# @return [String]
attr_accessor :state_details
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@auto_create_routes = args[:auto_create_routes] if args.key?(:auto_create_routes)
@name = args[:name] if args.key?(:name)
@network = args[:network] if args.key?(:network)
@state = args[:state] if args.key?(:state)
@state_details = args[:state_details] if args.key?(:state_details)
end
end
# An Operation resource, used to manage asynchronous API requests.
class Operation
include Google::Apis::Core::Hashable
@ -7458,11 +7830,7 @@ module Google
class Policy
include Google::Apis::Core::Hashable
# Specifies audit logging configs for "data access". "data access": generally
# refers to data reads/writes and admin reads. "admin activity": generally
# refers to admin writes.
# Note: `AuditConfig` doesn't apply to "admin activity", which always enables
# audit logging.
# Specifies cloud audit logging configuration for this policy.
# Corresponds to the JSON property `auditConfigs`
# @return [Array<Google::Apis::ComputeBeta::AuditConfig>]
attr_accessor :audit_configs
@ -8206,8 +8574,8 @@ module Google
# priority value. If there is still a tie, it uses the layer three and four
# packet headers to select just one of the remaining matching routes. The packet
# is then forwarded as specified by the nextHop field of the winning route -
# either to another instance destination, a instance gateway or a Google Compute
# Engine-operated gateway.
# either to another instance destination, an instance gateway, or a Google
# Compute Engine-operated gateway.
# Packets that do not match any route in the sending instance's routing table
# are dropped.
class Route
@ -8281,6 +8649,12 @@ module Google
# @return [String]
attr_accessor :next_hop_network
# [Output Only] The network peering name that should handle matching packets,
# which should conform to RFC1035.
# Corresponds to the JSON property `nextHopPeering`
# @return [String]
attr_accessor :next_hop_peering
# The URL to a VpnTunnel that should handle matching packets.
# Corresponds to the JSON property `nextHopVpnTunnel`
# @return [String]
@ -8327,6 +8701,7 @@ module Google
@next_hop_instance = args[:next_hop_instance] if args.key?(:next_hop_instance)
@next_hop_ip = args[:next_hop_ip] if args.key?(:next_hop_ip)
@next_hop_network = args[:next_hop_network] if args.key?(:next_hop_network)
@next_hop_peering = args[:next_hop_peering] if args.key?(:next_hop_peering)
@next_hop_vpn_tunnel = args[:next_hop_vpn_tunnel] if args.key?(:next_hop_vpn_tunnel)
@priority = args[:priority] if args.key?(:priority)
@self_link = args[:self_link] if args.key?(:self_link)

View File

@ -22,6 +22,48 @@ module Google
module Apis
module ComputeBeta
class AcceleratorConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AcceleratorType
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AcceleratorTypeAggregatedList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AcceleratorTypeList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AcceleratorTypesScopedList
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 AccessConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -748,6 +790,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class InstancesSetMachineResourcesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class InstancesSetMachineTypeRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -880,6 +928,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class NetworkPeering
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1618,6 +1672,82 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AcceleratorConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :accelerator_count, as: 'acceleratorCount'
property :accelerator_type, as: 'acceleratorType'
end
end
class AcceleratorType
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_timestamp, as: 'creationTimestamp'
property :deprecated, as: 'deprecated', class: Google::Apis::ComputeBeta::DeprecationStatus, decorator: Google::Apis::ComputeBeta::DeprecationStatus::Representation
property :description, as: 'description'
property :id, as: 'id'
property :kind, as: 'kind'
property :maximum_cards_per_instance, as: 'maximumCardsPerInstance'
property :name, as: 'name'
property :self_link, as: 'selfLink'
property :zone, as: 'zone'
end
end
class AcceleratorTypeAggregatedList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
hash :items, as: 'items', class: Google::Apis::ComputeBeta::AcceleratorTypesScopedList, decorator: Google::Apis::ComputeBeta::AcceleratorTypesScopedList::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
class AcceleratorTypeList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeBeta::AcceleratorType, decorator: Google::Apis::ComputeBeta::AcceleratorType::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
class AcceleratorTypesScopedList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :accelerator_types, as: 'acceleratorTypes', class: Google::Apis::ComputeBeta::AcceleratorType, decorator: Google::Apis::ComputeBeta::AcceleratorType::Representation
property :warning, as: 'warning', class: Google::Apis::ComputeBeta::AcceleratorTypesScopedList::Warning, decorator: Google::Apis::ComputeBeta::AcceleratorTypesScopedList::Warning::Representation
end
class Warning
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ComputeBeta::AcceleratorTypesScopedList::Warning::Datum, decorator: Google::Apis::ComputeBeta::AcceleratorTypesScopedList::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 AccessConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -2599,6 +2729,8 @@ module Google
property :description, as: 'description'
collection :disks, as: 'disks', class: Google::Apis::ComputeBeta::AttachedDisk, decorator: Google::Apis::ComputeBeta::AttachedDisk::Representation
collection :guest_accelerators, as: 'guestAccelerators', class: Google::Apis::ComputeBeta::AcceleratorConfig, decorator: Google::Apis::ComputeBeta::AcceleratorConfig::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :label_fingerprint, :base64 => true, as: 'labelFingerprint'
@ -3033,6 +3165,14 @@ module Google
end
end
class InstancesSetMachineResourcesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :guest_accelerators, as: 'guestAccelerators', class: Google::Apis::ComputeBeta::AcceleratorConfig, decorator: Google::Apis::ComputeBeta::AcceleratorConfig::Representation
end
end
class InstancesSetMachineTypeRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -3228,6 +3368,8 @@ module Google
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
collection :peerings, as: 'peerings', class: Google::Apis::ComputeBeta::NetworkPeering, decorator: Google::Apis::ComputeBeta::NetworkPeering::Representation
property :self_link, as: 'selfLink'
collection :subnetworks, as: 'subnetworks'
end
@ -3258,6 +3400,17 @@ module Google
end
end
class NetworkPeering
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :auto_create_routes, as: 'autoCreateRoutes'
property :name, as: 'name'
property :network, as: 'network'
property :state, as: 'state'
property :state_details, as: 'stateDetails'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -3615,6 +3768,7 @@ module Google
property :next_hop_instance, as: 'nextHopInstance'
property :next_hop_ip, as: 'nextHopIp'
property :next_hop_network, as: 'nextHopNetwork'
property :next_hop_peering, as: 'nextHopPeering'
property :next_hop_vpn_tunnel, as: 'nextHopVpnTunnel'
property :priority, as: 'priority'
property :self_link, as: 'selfLink'

View File

@ -52,6 +52,205 @@ module Google
super('https://www.googleapis.com/', 'compute/beta/projects/')
end
# Retrieves an aggregated list of accelerator types.
# @param [String] project
# Project ID for this request.
# @param [String] filter
# Sets a filter expression for filtering listed resources, in the form filter=`
# expression`. 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 filter=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.
# @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::ComputeBeta::AcceleratorTypeAggregatedList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeBeta::AcceleratorTypeAggregatedList]
#
# @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 aggregated_accelerator_type_list(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/acceleratorTypes', options)
command.response_representation = Google::Apis::ComputeBeta::AcceleratorTypeAggregatedList::Representation
command.response_class = Google::Apis::ComputeBeta::AcceleratorTypeAggregatedList
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
# Returns the specified accelerator type. Get a list of available accelerator
# types by making a list() request.
# @param [String] project
# Project ID for this request.
# @param [String] zone
# The name of the zone for this request.
# @param [String] accelerator_type
# Name of the accelerator type to return.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# 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::ComputeBeta::AcceleratorType] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeBeta::AcceleratorType]
#
# @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_accelerator_type(project, zone, accelerator_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/zones/{zone}/acceleratorTypes/{acceleratorType}', options)
command.response_representation = Google::Apis::ComputeBeta::AcceleratorType::Representation
command.response_class = Google::Apis::ComputeBeta::AcceleratorType
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['acceleratorType'] = accelerator_type unless accelerator_type.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 a list of accelerator types available to the specified project.
# @param [String] project
# Project ID for this request.
# @param [String] zone
# The name of the zone for this request.
# @param [String] filter
# Sets a filter expression for filtering listed resources, in the form filter=`
# expression`. 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 filter=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.
# @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::ComputeBeta::AcceleratorTypeList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeBeta::AcceleratorTypeList]
#
# @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_accelerator_types(project, zone, 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}/zones/{zone}/acceleratorTypes', options)
command.response_representation = Google::Apis::ComputeBeta::AcceleratorTypeList::Representation
command.response_class = Google::Apis::ComputeBeta::AcceleratorTypeList
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.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
# Retrieves an aggregated list of addresses.
# @param [String] project
# Project ID for this request.
@ -5369,10 +5568,11 @@ module Google
end
# Updates a managed instance group using the information that you specify in the
# request. This operation is marked as DONE when the group is updated even if
# the instances in the group have not yet been updated. You must separately
# verify the status of the individual instances with the listmanagedinstances
# method. This method supports patch semantics.
# request. The field statefulPolicy is updated using PATCH semantics. This
# operation is marked as DONE when the group is updated even if the instances in
# the group have not yet been updated. You must separately verify the status of
# the individual instances with the listmanagedinstances method. This method
# supports patch semantics.
# @param [String] project
# Project ID for this request.
# @param [String] zone
@ -5752,10 +5952,10 @@ module Google
end
# Updates a managed instance group using the information that you specify in the
# request. This operation is marked as DONE when the group is updated even if
# the instances in the group have not yet been updated. You must separately
# verify the status of the individual instances with the listmanagedinstances
# method.
# request. The field statefulPolicy is updated using PATCH semantics. This
# operation is marked as DONE when the group is updated even if the instances in
# the group have not yet been updated. You must separately verify the status of
# the individual instances with the listmanagedinstances method.
# @param [String] project
# Project ID for this request.
# @param [String] zone
@ -7237,6 +7437,51 @@ module Google
execute_or_queue_command(command, &block)
end
# Changes the number and/or type of accelerator for a stopped instance to the
# values specified in the request.
# @param [String] project
# Project ID for this request.
# @param [String] zone
# The name of the zone for this request.
# @param [String] instance
# Name of the instance scoping this request.
# @param [Google::Apis::ComputeBeta::InstancesSetMachineResourcesRequest] instances_set_machine_resources_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::ComputeBeta::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeBeta::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_machine_resources(project, zone, instance, instances_set_machine_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setMachineResources', options)
command.request_representation = Google::Apis::ComputeBeta::InstancesSetMachineResourcesRequest::Representation
command.request_object = instances_set_machine_resources_request_object
command.response_representation = Google::Apis::ComputeBeta::Operation::Representation
command.response_class = Google::Apis::ComputeBeta::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['instance'] = instance unless instance.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 machine type for a stopped instance to the machine type specified
# in the request.
# @param [String] project
@ -8220,6 +8465,10 @@ module Google
# @param [String] project
# Project ID for this request.
# @param [Google::Apis::ComputeBeta::ProjectsListXpnHostsRequest] projects_list_xpn_hosts_request_object
# @param [String] filter
# @param [Fixnum] max_results
# @param [String] order_by
# @param [String] page_token
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -8241,13 +8490,17 @@ 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 list_project_xpn_hosts(project, projects_list_xpn_hosts_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
def list_project_xpn_hosts(project, projects_list_xpn_hosts_request_object = nil, 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(:post, '{project}/listXpnHosts', options)
command.request_representation = Google::Apis::ComputeBeta::ProjectsListXpnHostsRequest::Representation
command.request_object = projects_list_xpn_hosts_request_object
command.response_representation = Google::Apis::ComputeBeta::XpnHostList::Representation
command.response_class = Google::Apis::ComputeBeta::XpnHostList
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['order_by'] = 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?

View File

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

View File

@ -1814,13 +1814,12 @@ module Google
class DiskList
include Google::Apis::Core::Hashable
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] A list of persistent disks.
# A list of Disk resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ComputeV1::Disk>]
attr_accessor :items
@ -1830,11 +1829,7 @@ module Google
# @return [String]
attr_accessor :kind
# [Output Only] This token allows you to get the next page of results for list
# requests. If the number of results is larger than maxResults, use the
# nextPageToken as a value for the query parameter pageToken in the next list
# request. Subsequent list requests will have their own nextPageToken to
# continue paging through the results.
# [Output Only] A token used to continue a truncated list request.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
@ -2461,7 +2456,7 @@ module Google
include Google::Apis::Core::Hashable
# The IP address that this forwarding rule is serving on behalf of.
# For global forwarding rules, the address must be a global IP; for regional
# For global forwarding rules, the address must be a global IP. For regional
# forwarding rules, the address must live in the same region as the forwarding
# rule. By default, this field is empty and an ephemeral IP from the same scope (
# global or regional) will be assigned.
@ -2476,7 +2471,7 @@ module Google
# The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP,
# AH, SCTP or ICMP.
# When the load balancing scheme is INTERNAL</code, only TCP and UDP are valid.
# When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
# Corresponds to the JSON property `IPProtocol`
# @return [String]
attr_accessor :ip_protocol
@ -2512,10 +2507,10 @@ module Google
attr_accessor :kind
# This signifies what the ForwardingRule will be used for and can only take the
# following values: INTERNAL EXTERNAL The value of INTERNAL means that this will
# be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL
# means that this will be used for External Load Balancing (HTTP(S) LB, External
# TCP/UDP LB, SSL Proxy)
# following values: INTERNAL, EXTERNAL The value of INTERNAL means that this
# will be used for Internal Network Load Balancing (TCP, UDP). The value of
# EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB,
# External TCP/UDP LB, SSL Proxy)
# Corresponds to the JSON property `loadBalancingScheme`
# @return [String]
attr_accessor :load_balancing_scheme
@ -6073,10 +6068,12 @@ module Google
# @return [String]
attr_accessor :name
# URL of the network resource for this instance. This is required for creating
# an instance but optional when creating a firewall rule. If not specified when
# creating a firewall rule, the default network is used:
# global/networks/default
# URL of the network resource for this instance. When creating an instance, if
# neither the network nor the subnetwork is specified, the default network
# global/networks/default is used; if the network is not specified but the
# subnetwork is specified, the network is inferred.
# This field is optional when creating a firewall rule. If not specified when
# creating a firewall rule, the default network global/networks/default is used.
# If you specify this property, you can specify the network as a full or partial
# URL. For example, the following are all valid URLs:
# - https://www.googleapis.com/compute/v1/projects/project/global/networks/
@ -7360,8 +7357,8 @@ module Google
# priority value. If there is still a tie, it uses the layer three and four
# packet headers to select just one of the remaining matching routes. The packet
# is then forwarded as specified by the nextHop field of the winning route -
# either to another instance destination, a instance gateway or a Google Compute
# Engine-operated gateway.
# either to another instance destination, an instance gateway, or a Google
# Compute Engine-operated gateway.
# Packets that do not match any route in the sending instance's routing table
# are dropped.
class Route

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/shopping-content
module ContentV2
VERSION = 'V2'
REVISION = '20170123'
REVISION = '20170207'
# Manage your product listings and accounts for Google Shopping
AUTH_CONTENT = 'https://www.googleapis.com/auth/content'

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/dataflow
module DataflowV1b3
VERSION = 'V1b3'
REVISION = '20170127'
REVISION = '20170210'
# 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

@ -32,16 +32,16 @@ module Google
#
# @see https://cloud.google.com/dataflow
class DataflowService < Google::Apis::Core::BaseService
# @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
# @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://dataflow.googleapis.com/', '')
end
@ -50,11 +50,11 @@ module Google
# @param [String] project_id
# The project to send the WorkerMessages to.
# @param [Google::Apis::DataflowV1b3::SendWorkerMessagesRequest] send_worker_messages_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -67,15 +67,15 @@ 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 worker_project_messages(project_id, send_worker_messages_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def worker_project_messages(project_id, send_worker_messages_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/WorkerMessages', options)
command.request_representation = Google::Apis::DataflowV1b3::SendWorkerMessagesRequest::Representation
command.request_object = send_worker_messages_request_object
command.response_representation = Google::Apis::DataflowV1b3::SendWorkerMessagesResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::SendWorkerMessagesResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -89,11 +89,11 @@ module Google
# @param [String] start_time
# Return only metric data that has changed since this time.
# Default is to return all information about all metrics for the job.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -106,7 +106,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 get_project_location_job_metrics(project_id, location, job_id, start_time: nil, quota_user: nil, fields: nil, options: nil, &block)
def get_project_location_job_metrics(project_id, location, job_id, start_time: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics', options)
command.response_representation = Google::Apis::DataflowV1b3::JobMetrics::Representation
command.response_class = Google::Apis::DataflowV1b3::JobMetrics
@ -114,8 +114,8 @@ module Google
command.params['location'] = location unless location.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -128,11 +128,11 @@ module Google
# The job ID.
# @param [String] view
# The level of information requested in response.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -145,7 +145,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 get_project_location_job(project_id, location, job_id, view: nil, quota_user: nil, fields: nil, options: nil, &block)
def get_project_location_job(project_id, location, job_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}', options)
command.response_representation = Google::Apis::DataflowV1b3::Job::Representation
command.response_class = Google::Apis::DataflowV1b3::Job
@ -153,8 +153,8 @@ module Google
command.params['location'] = location unless location.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['view'] = view unless view.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -163,8 +163,6 @@ module Google
# The project which owns the jobs.
# @param [String] location
# The location that contains this job.
# @param [String] filter
# The kind of filter to use.
# @param [String] page_token
# Set this to the 'next_page_token' field of a previous response
# to request additional results in a long list.
@ -174,11 +172,13 @@ module Google
# and an unspecified server-defined limit.
# @param [String] view
# Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
# @param [String] filter
# The kind of filter to use.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -191,18 +191,18 @@ 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 list_project_location_jobs(project_id, location, filter: nil, page_token: nil, page_size: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block)
def list_project_location_jobs(project_id, location, page_token: nil, page_size: nil, view: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs', options)
command.response_representation = Google::Apis::DataflowV1b3::ListJobsResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::ListJobsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['location'] = location unless location.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['view'] = view unless view.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -214,11 +214,11 @@ module Google
# @param [String] job_id
# The job ID.
# @param [Google::Apis::DataflowV1b3::Job] job_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -231,7 +231,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 update_project_location_job(project_id, location, job_id, job_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def update_project_location_job(project_id, location, job_id, job_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}', options)
command.request_representation = Google::Apis::DataflowV1b3::Job::Representation
command.request_object = job_object
@ -240,8 +240,8 @@ module Google
command.params['projectId'] = project_id unless project_id.nil?
command.params['location'] = location unless location.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -251,15 +251,15 @@ module Google
# @param [String] location
# The location that contains this job.
# @param [Google::Apis::DataflowV1b3::Job] job_object
# @param [String] replace_job_id
# Deprecated. This field is now in the Job message.
# @param [String] view
# The level of information requested in response.
# @param [String] replace_job_id
# Deprecated. This field is now in the Job message.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -272,7 +272,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 create_project_location_job(project_id, location, job_object = nil, replace_job_id: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block)
def create_project_location_job(project_id, location, job_object = nil, view: nil, replace_job_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs', options)
command.request_representation = Google::Apis::DataflowV1b3::Job::Representation
command.request_object = job_object
@ -280,10 +280,10 @@ module Google
command.response_class = Google::Apis::DataflowV1b3::Job
command.params['projectId'] = project_id unless project_id.nil?
command.params['location'] = location unless location.nil?
command.query['replaceJobId'] = replace_job_id unless replace_job_id.nil?
command.query['view'] = view unless view.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['replaceJobId'] = replace_job_id unless replace_job_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
@ -295,11 +295,11 @@ module Google
# @param [String] job_id
# Identifies the workflow job this worker belongs to.
# @param [Google::Apis::DataflowV1b3::LeaseWorkItemRequest] lease_work_item_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -312,7 +312,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 lease_project_location_work_item(project_id, location, job_id, lease_work_item_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def lease_project_location_work_item(project_id, location, job_id, lease_work_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease', options)
command.request_representation = Google::Apis::DataflowV1b3::LeaseWorkItemRequest::Representation
command.request_object = lease_work_item_request_object
@ -321,8 +321,8 @@ module Google
command.params['projectId'] = project_id unless project_id.nil?
command.params['location'] = location unless location.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -334,11 +334,11 @@ module Google
# @param [String] job_id
# The job which the WorkItem is part of.
# @param [Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest] report_work_item_status_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -351,7 +351,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 report_project_location_job_work_item_status(project_id, location, job_id, report_work_item_status_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def report_project_location_job_work_item_status(project_id, location, job_id, report_work_item_status_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus', options)
command.request_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest::Representation
command.request_object = report_work_item_status_request_object
@ -360,8 +360,8 @@ module Google
command.params['projectId'] = project_id unless project_id.nil?
command.params['location'] = location unless location.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -372,27 +372,27 @@ module Google
# The location which contains the job specified by job_id.
# @param [String] job_id
# The job to get messages about.
# @param [String] minimum_importance
# Filter to only get messages with importance >= level
# @param [String] end_time
# Return only messages with timestamps < end_time. The default is now
# (i.e. return up to the latest messages available).
# @param [String] start_time
# If specified, return only messages with timestamps >= start_time.
# The default is the job creation time (i.e. beginning of messages).
# @param [String] page_token
# If supplied, this should be the value of next_page_token returned
# by an earlier call. This will cause the next page of results to
# be returned.
# @param [String] start_time
# If specified, return only messages with timestamps >= start_time.
# The default is the job creation time (i.e. beginning of messages).
# @param [Fixnum] page_size
# If specified, determines the maximum number of messages to
# return. If unspecified, the service may choose an appropriate
# default, or may return an arbitrarily large number of results.
# @param [String] minimum_importance
# Filter to only get messages with importance >= level
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -405,20 +405,20 @@ 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 list_project_location_job_messages(project_id, location, job_id, end_time: nil, start_time: nil, page_token: nil, page_size: nil, minimum_importance: nil, quota_user: nil, fields: nil, options: nil, &block)
def list_project_location_job_messages(project_id, location, job_id, minimum_importance: nil, end_time: nil, page_token: nil, start_time: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages', options)
command.response_representation = Google::Apis::DataflowV1b3::ListJobMessagesResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::ListJobMessagesResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['location'] = location unless location.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['minimumImportance'] = minimum_importance unless minimum_importance.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -426,11 +426,11 @@ module Google
# @param [String] project_id
# Required. The ID of the Cloud Platform project that the job belongs to.
# @param [Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest] create_job_from_template_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -443,15 +443,15 @@ 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 create_job_from_template(project_id, create_job_from_template_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def create_job_from_template(project_id, create_job_from_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/templates', options)
command.request_representation = Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest::Representation
command.request_object = create_job_from_template_request_object
command.response_representation = Google::Apis::DataflowV1b3::Job::Representation
command.response_class = Google::Apis::DataflowV1b3::Job
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -460,16 +460,16 @@ module Google
# A project id.
# @param [String] job_id
# The job to get messages for.
# @param [String] location
# The location which contains the job specified by job_id.
# @param [String] start_time
# Return only metric data that has changed since this time.
# Default is to return all information about all metrics for the job.
# @param [String] location
# The location which contains the job specified by job_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -482,16 +482,16 @@ 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 get_project_job_metrics(project_id, job_id, location: nil, start_time: nil, quota_user: nil, fields: nil, options: nil, &block)
def get_project_job_metrics(project_id, job_id, start_time: nil, location: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}/metrics', options)
command.response_representation = Google::Apis::DataflowV1b3::JobMetrics::Representation
command.response_class = Google::Apis::DataflowV1b3::JobMetrics
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['location'] = location unless location.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['location'] = location unless location.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -504,11 +504,11 @@ module Google
# The location that contains this job.
# @param [String] view
# The level of information requested in response.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -521,7 +521,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 get_project_job(project_id, job_id, location: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block)
def get_project_job(project_id, job_id, location: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}', options)
command.response_representation = Google::Apis::DataflowV1b3::Job::Representation
command.response_class = Google::Apis::DataflowV1b3::Job
@ -529,14 +529,20 @@ module Google
command.params['jobId'] = job_id unless job_id.nil?
command.query['location'] = location unless location.nil?
command.query['view'] = view unless view.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# List the jobs of a project.
# @param [String] project_id
# The project which owns the jobs.
# @param [Fixnum] page_size
# If there are many jobs, limit response to at most this many.
# The actual number of jobs returned will be the lesser of max_responses
# and an unspecified server-defined limit.
# @param [String] view
# Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
# @param [String] filter
# The kind of filter to use.
# @param [String] location
@ -544,17 +550,11 @@ module Google
# @param [String] page_token
# Set this to the 'next_page_token' field of a previous response
# to request additional results in a long list.
# @param [Fixnum] page_size
# If there are many jobs, limit response to at most this many.
# The actual number of jobs returned will be the lesser of max_responses
# and an unspecified server-defined limit.
# @param [String] view
# Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -567,18 +567,18 @@ 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 list_project_jobs(project_id, filter: nil, location: nil, page_token: nil, page_size: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block)
def list_project_jobs(project_id, page_size: nil, view: nil, filter: nil, location: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs', options)
command.response_representation = Google::Apis::DataflowV1b3::ListJobsResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::ListJobsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['view'] = view unless view.nil?
command.query['filter'] = filter unless filter.nil?
command.query['location'] = location unless location.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['view'] = view unless view.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -590,11 +590,11 @@ module Google
# @param [Google::Apis::DataflowV1b3::Job] job_object
# @param [String] location
# The location that contains this job.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -607,7 +607,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 update_project_job(project_id, job_id, job_object = nil, location: nil, quota_user: nil, fields: nil, options: nil, &block)
def update_project_job(project_id, job_id, job_object = nil, location: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1b3/projects/{projectId}/jobs/{jobId}', options)
command.request_representation = Google::Apis::DataflowV1b3::Job::Representation
command.request_object = job_object
@ -616,8 +616,8 @@ module Google
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['location'] = location unless location.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -625,17 +625,17 @@ module Google
# @param [String] project_id
# The ID of the Cloud Platform project that the job belongs to.
# @param [Google::Apis::DataflowV1b3::Job] job_object
# @param [String] view
# The level of information requested in response.
# @param [String] location
# The location that contains this job.
# @param [String] replace_job_id
# Deprecated. This field is now in the Job message.
# @param [String] view
# The level of information requested in response.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -648,75 +648,18 @@ 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 create_project_job(project_id, job_object = nil, location: nil, replace_job_id: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block)
def create_project_job(project_id, job_object = nil, view: nil, location: nil, replace_job_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs', options)
command.request_representation = Google::Apis::DataflowV1b3::Job::Representation
command.request_object = job_object
command.response_representation = Google::Apis::DataflowV1b3::Job::Representation
command.response_class = Google::Apis::DataflowV1b3::Job
command.params['projectId'] = project_id unless project_id.nil?
command.query['view'] = view unless view.nil?
command.query['location'] = location unless location.nil?
command.query['replaceJobId'] = replace_job_id unless replace_job_id.nil?
command.query['view'] = view unless view.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Request the job status.
# @param [String] project_id
# A project id.
# @param [String] job_id
# The job to get messages about.
# @param [String] location
# The location which contains the job specified by job_id.
# @param [String] end_time
# Return only messages with timestamps < end_time. The default is now
# (i.e. return up to the latest messages available).
# @param [String] page_token
# If supplied, this should be the value of next_page_token returned
# by an earlier call. This will cause the next page of results to
# be returned.
# @param [String] start_time
# If specified, return only messages with timestamps >= start_time.
# The default is the job creation time (i.e. beginning of messages).
# @param [Fixnum] page_size
# If specified, determines the maximum number of messages to
# return. If unspecified, the service may choose an appropriate
# default, or may return an arbitrarily large number of results.
# @param [String] minimum_importance
# Filter to only get messages with importance >= level
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataflowV1b3::ListJobMessagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataflowV1b3::ListJobMessagesResponse]
#
# @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_job_messages(project_id, job_id, location: nil, end_time: nil, page_token: nil, start_time: nil, page_size: nil, minimum_importance: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}/messages', options)
command.response_representation = Google::Apis::DataflowV1b3::ListJobMessagesResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::ListJobMessagesResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['location'] = location unless location.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['minimumImportance'] = minimum_importance unless minimum_importance.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -726,11 +669,11 @@ module Google
# @param [String] job_id
# The job id.
# @param [Google::Apis::DataflowV1b3::GetDebugConfigRequest] get_debug_config_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -743,7 +686,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 get_project_job_debug_config(project_id, job_id, get_debug_config_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def get_project_job_debug_config(project_id, job_id, get_debug_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig', options)
command.request_representation = Google::Apis::DataflowV1b3::GetDebugConfigRequest::Representation
command.request_object = get_debug_config_request_object
@ -751,8 +694,8 @@ module Google
command.response_class = Google::Apis::DataflowV1b3::GetDebugConfigResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
@ -762,11 +705,11 @@ module Google
# @param [String] job_id
# The job id.
# @param [Google::Apis::DataflowV1b3::SendDebugCaptureRequest] send_debug_capture_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -779,7 +722,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 send_project_job_debug_capture(project_id, job_id, send_debug_capture_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def send_project_job_debug_capture(project_id, job_id, send_debug_capture_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture', options)
command.request_representation = Google::Apis::DataflowV1b3::SendDebugCaptureRequest::Representation
command.request_object = send_debug_capture_request_object
@ -787,44 +730,8 @@ module Google
command.response_class = Google::Apis::DataflowV1b3::SendDebugCaptureResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Reports the status of dataflow WorkItems leased by a worker.
# @param [String] project_id
# The project which owns the WorkItem's job.
# @param [String] job_id
# The job which the WorkItem is part of.
# @param [Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest] report_work_item_status_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse]
#
# @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 report_project_job_work_item_status(project_id, job_id, report_work_item_status_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus', options)
command.request_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest::Representation
command.request_object = report_work_item_status_request_object
command.response_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -834,11 +741,11 @@ module Google
# @param [String] job_id
# Identifies the workflow job this worker belongs to.
# @param [Google::Apis::DataflowV1b3::LeaseWorkItemRequest] lease_work_item_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -851,7 +758,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 lease_project_work_item(project_id, job_id, lease_work_item_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def lease_project_work_item(project_id, job_id, lease_work_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease', options)
command.request_representation = Google::Apis::DataflowV1b3::LeaseWorkItemRequest::Representation
command.request_object = lease_work_item_request_object
@ -859,16 +766,109 @@ module Google
command.response_class = Google::Apis::DataflowV1b3::LeaseWorkItemResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Reports the status of dataflow WorkItems leased by a worker.
# @param [String] project_id
# The project which owns the WorkItem's job.
# @param [String] job_id
# The job which the WorkItem is part of.
# @param [Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest] report_work_item_status_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::DataflowV1b3::ReportWorkItemStatusResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse]
#
# @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 report_project_job_work_item_status(project_id, job_id, report_work_item_status_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus', options)
command.request_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest::Representation
command.request_object = report_work_item_status_request_object
command.response_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_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 the job status.
# @param [String] project_id
# A project id.
# @param [String] job_id
# The job to get messages about.
# @param [String] page_token
# If supplied, this should be the value of next_page_token returned
# by an earlier call. This will cause the next page of results to
# be returned.
# @param [String] start_time
# If specified, return only messages with timestamps >= start_time.
# The default is the job creation time (i.e. beginning of messages).
# @param [Fixnum] page_size
# If specified, determines the maximum number of messages to
# return. If unspecified, the service may choose an appropriate
# default, or may return an arbitrarily large number of results.
# @param [String] minimum_importance
# Filter to only get messages with importance >= level
# @param [String] location
# The location which contains the job specified by job_id.
# @param [String] end_time
# Return only messages with timestamps < end_time. The default is now
# (i.e. return up to the latest messages available).
# @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::DataflowV1b3::ListJobMessagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataflowV1b3::ListJobMessagesResponse]
#
# @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_job_messages(project_id, job_id, page_token: nil, start_time: nil, page_size: nil, minimum_importance: nil, location: nil, end_time: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}/messages', options)
command.response_representation = Google::Apis::DataflowV1b3::ListJobMessagesResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::ListJobMessagesResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTime'] = start_time unless start_time.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['minimumImportance'] = minimum_importance unless minimum_importance.nil?
command.query['location'] = location unless location.nil?
command.query['endTime'] = end_time unless end_time.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['quotaUser'] = quota_user unless quota_user.nil?
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end

View File

@ -20,12 +20,12 @@ module Google
module Apis
# Google Cloud Dataproc API
#
# An API for managing Hadoop-based clusters and jobs on Google Cloud Platform.
# Manages Hadoop-based clusters and jobs on Google Cloud Platform.
#
# @see https://cloud.google.com/dataproc/
module DataprocV1
VERSION = 'V1'
REVISION = '20161102'
REVISION = '20170207'
# 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

@ -22,7 +22,7 @@ module Google
module DataprocV1
# Google Cloud Dataproc API
#
# An API for managing Hadoop-based clusters and jobs on Google Cloud Platform.
# Manages Hadoop-based clusters and jobs on Google Cloud Platform.
#
# @example
# require 'google/apis/dataproc_v1'
@ -46,12 +46,395 @@ module Google
super('https://dataproc.googleapis.com/', '')
end
# Starts a job cancellation request. To access the job resource after
# cancellation, call regions/`region`/jobs.list or regions/`region`/jobs.get.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] job_id
# Required The job ID.
# @param [Google::Apis::DataprocV1::CancelJobRequest] cancel_job_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::DataprocV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Job]
#
# @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_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options)
command.request_representation = Google::Apis::DataprocV1::CancelJobRequest::Representation
command.request_object = cancel_job_request_object
command.response_representation = Google::Apis::DataprocV1::Job::Representation
command.response_class = Google::Apis::DataprocV1::Job
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_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
# Gets the resource representation for a job in a project.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] job_id
# Required The job 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::DataprocV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Job]
#
# @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_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
command.response_representation = Google::Apis::DataprocV1::Job::Representation
command.response_class = Google::Apis::DataprocV1::Job
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_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
# Updates a job in a project.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] job_id
# Required The job ID.
# @param [Google::Apis::DataprocV1::Job] job_object
# @param [String] update_mask
# Required Specifies the path, relative to <code>Job</code>, of the field to
# update. For example, to update the labels of a Job the <code>update_mask</code>
# parameter would be specified as <code>labels</code>, and the PATCH request
# body would specify the new value. <strong>Note:</strong> Currently, <code>
# labels</code> is the only field that can 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::DataprocV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Job]
#
# @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_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
command.request_representation = Google::Apis::DataprocV1::Job::Representation
command.request_object = job_object
command.response_representation = Google::Apis::DataprocV1::Job::Representation
command.response_class = Google::Apis::DataprocV1::Job
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_id.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
# Submits a job to a cluster.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [Google::Apis::DataprocV1::SubmitJobRequest] submit_job_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::DataprocV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Job]
#
# @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 submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs:submit', options)
command.request_representation = Google::Apis::DataprocV1::SubmitJobRequest::Representation
command.request_object = submit_job_request_object
command.response_representation = Google::Apis::DataprocV1::Job::Representation
command.response_class = Google::Apis::DataprocV1::Job
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes the job from the project. If the job is active, the delete fails, and
# the response returns FAILED_PRECONDITION.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] job_id
# Required The job 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::DataprocV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::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_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
command.response_representation = Google::Apis::DataprocV1::Empty::Representation
command.response_class = Google::Apis::DataprocV1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_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
# Lists regions/`region`/jobs in a project.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] filter
# Optional A filter constraining the jobs to list. Filters are case-sensitive
# and have the following syntax:field = value AND field = value ...where field
# is status.state or labels.[KEY], and [KEY] is a label key. value can be * to
# match all values. status.state can be either ACTIVE or INACTIVE. Only the
# logical AND operator is supported; space-separated items are treated as having
# an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env =
# staging AND labels.starred = *
# @param [String] job_state_matcher
# Optional Specifies enumerated categories of jobs to list (default = match ALL
# jobs).
# @param [String] page_token
# Optional The page token, returned by a previous call, to request the next page
# of results.
# @param [Fixnum] page_size
# Optional The number of results to return in each response.
# @param [String] cluster_name
# Optional If set, the returned jobs list includes only jobs that were submitted
# to the named cluster.
# @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::DataprocV1::ListJobsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::ListJobsResponse]
#
# @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_jobs(project_id, region, filter: nil, job_state_matcher: nil, page_token: nil, page_size: nil, cluster_name: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', options)
command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation
command.response_class = Google::Apis::DataprocV1::ListJobsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.query['filter'] = filter unless filter.nil?
command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['clusterName'] = cluster_name unless cluster_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 cluster diagnostic information. After the operation completes, the
# Operation.response field contains DiagnoseClusterOutputLocation.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the cluster belongs
# to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] cluster_name
# Required The cluster name.
# @param [Google::Apis::DataprocV1::DiagnoseClusterRequest] diagnose_cluster_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::DataprocV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::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 diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', options)
command.request_representation = Google::Apis::DataprocV1::DiagnoseClusterRequest::Representation
command.request_object = diagnose_cluster_request_object
command.response_representation = Google::Apis::DataprocV1::Operation::Representation
command.response_class = Google::Apis::DataprocV1::Operation
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['clusterName'] = cluster_name unless cluster_name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a cluster in a project.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the cluster belongs
# to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] cluster_name
# Required The cluster name.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::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_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
command.response_representation = Google::Apis::DataprocV1::Operation::Representation
command.response_class = Google::Apis::DataprocV1::Operation
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['clusterName'] = cluster_name unless cluster_name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists all regions/`region`/clusters in a project.
# @param [String] project_id
# Required The ID of the Google Cloud Platform project that the cluster belongs
# to.
# @param [String] region
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] page_token
# Optional The standard List page token.
# @param [Fixnum] page_size
# Optional The standard List page size.
# @param [String] filter
# Optional A filter constraining the clusters to list. Filters are case-
# sensitive and have the following syntax:field = value AND field = value ...
# where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is
# a label key. value can be * to match all values. status.state can be one of
# the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or
# UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE
# contains the DELETING and ERROR states. clusterName is the name of the cluster
# provided at creation time. Only the logical AND operator is supported; space-
# separated items are treated as having an implicit AND operator.Example filter:
# status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND
# labels.starred = *
# @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::DataprocV1::ListClustersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::ListClustersResponse]
#
# @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_clusters(project_id, region, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', options)
command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation
command.response_class = Google::Apis::DataprocV1::ListClustersResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a cluster in a project.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the cluster
# belongs to.
# Required The ID of the Google Cloud Platform project that the cluster belongs
# to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# Required The Cloud Dataproc region in which to handle the request.
# @param [Google::Apis::DataprocV1::Cluster] cluster_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -85,24 +468,39 @@ module Google
# Updates a cluster in a project.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project the cluster belongs to.
# Required The ID of the Google Cloud Platform project the cluster belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] cluster_name
# [Required] The cluster name.
# Required The cluster name.
# @param [Google::Apis::DataprocV1::Cluster] cluster_object
# @param [String] update_mask
# [Required] Specifies the path, relative to Cluster, of the field to update.
# For example, to change the number of workers in a cluster to 5, the
# update_mask parameter would be specified as config.worker_config.num_instances,
# and the `PATCH` request body would specify the new value, as follows: ` "
# config":` "workerConfig":` "numInstances":"5" ` ` ` Similarly, to change the
# number of preemptible workers in a cluster to 5, the update_mask parameter
# would be config.secondary_worker_config.num_instances, and the `PATCH` request
# body would be set as follows: ` "config":` "secondaryWorkerConfig":` "
# numInstances":"5" ` ` ` Note: Currently, config.worker_config.num_instances
# and config.secondary_worker_config.num_instances are the only fields that can
# be updated.
# Required Specifies the path, relative to <code>Cluster</code>, of the field to
# update. For example, to change the number of workers in a cluster to 5, the <
# code>update_mask</code> parameter would be specified as <code>config.
# worker_config.num_instances</code>, and the PATCH request body would specify
# the new value, as follows:
# `
# "config":`
# "workerConfig":`
# "numInstances":"5"
# `
# `
# `
# Similarly, to change the number of preemptible workers in a cluster to 5, the <
# code>update_mask</code> parameter would be <code>config.
# secondary_worker_config.num_instances</code>, and the PATCH request body would
# be set as follows:
# `
# "config":`
# "secondaryWorkerConfig":`
# "numInstances":"5"
# `
# `
# `
# <strong>Note:</strong> Currently, <code>config.worker_config.num_instances</
# code> and <code>config.secondary_worker_config.num_instances</code> are the
# only fields that can be updated.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -135,51 +533,14 @@ module Google
execute_or_queue_command(command, &block)
end
# Deletes a cluster in a project.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the cluster
# belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# @param [String] cluster_name
# [Required] The cluster name.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::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_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
command.response_representation = Google::Apis::DataprocV1::Operation::Representation
command.response_class = Google::Apis::DataprocV1::Operation
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['clusterName'] = cluster_name unless cluster_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 resource representation for a cluster in a project.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the cluster
# belongs to.
# Required The ID of the Google Cloud Platform project that the cluster belongs
# to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# Required The Cloud Dataproc region in which to handle the request.
# @param [String] cluster_name
# [Required] The cluster name.
# Required The cluster name.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -209,283 +570,16 @@ module Google
execute_or_queue_command(command, &block)
end
# Lists all regions/`region`/clusters in a project.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the cluster
# belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# @param [String] filter
# [Optional] A filter constraining the clusters to list. Filters are case-
# sensitive and have the following syntax: field:value [field:value] ... or
# field = value [AND [field = value]] ... where **field** is one of `status.
# state`, `clusterName`, or `labels.[KEY]`, and `[KEY]` is a label key. **value**
# can be `*` to match all values. `status.state` can be one of the following: `
# ACTIVE`, `INACTIVE`, `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`.
# `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
# contains the `DELETING` and `ERROR` states. `clusterName` is the name of the
# cluster provided at creation time. Only the logical `AND` operator is
# supported; space-separated items are treated as having an implicit `AND`
# operator. Example valid filters are: status.state:ACTIVE clusterName:mycluster
# labels.env:staging \ labels.starred:* and status.state = ACTIVE AND
# clusterName = mycluster \ AND labels.env = staging AND labels.starred = *
# @param [Fixnum] page_size
# [Optional] The standard List page size.
# @param [String] page_token
# [Optional] The standard List page token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::ListClustersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::ListClustersResponse]
#
# @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_clusters(project_id, region, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', options)
command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation
command.response_class = Google::Apis::DataprocV1::ListClustersResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets cluster diagnostic information. After the operation completes, the
# Operation.response field contains `DiagnoseClusterOutputLocation`.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the cluster
# belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# @param [String] cluster_name
# [Required] The cluster name.
# @param [Google::Apis::DataprocV1::DiagnoseClusterRequest] diagnose_cluster_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::DataprocV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::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 diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', options)
command.request_representation = Google::Apis::DataprocV1::DiagnoseClusterRequest::Representation
command.request_object = diagnose_cluster_request_object
command.response_representation = Google::Apis::DataprocV1::Operation::Representation
command.response_class = Google::Apis::DataprocV1::Operation
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['clusterName'] = cluster_name unless cluster_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
# Submits a job to a cluster.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# @param [Google::Apis::DataprocV1::SubmitJobRequest] submit_job_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::DataprocV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Job]
#
# @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 submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs:submit', options)
command.request_representation = Google::Apis::DataprocV1::SubmitJobRequest::Representation
command.request_object = submit_job_request_object
command.response_representation = Google::Apis::DataprocV1::Job::Representation
command.response_class = Google::Apis::DataprocV1::Job
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.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 resource representation for a job in a project.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# @param [String] job_id
# [Required] The job 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::DataprocV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Job]
#
# @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_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
command.response_representation = Google::Apis::DataprocV1::Job::Representation
command.response_class = Google::Apis::DataprocV1::Job
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_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
# Lists regions/`region`/jobs in a project.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# @param [Fixnum] page_size
# [Optional] The number of results to return in each response.
# @param [String] page_token
# [Optional] The page token, returned by a previous call, to request the next
# page of results.
# @param [String] cluster_name
# [Optional] If set, the returned jobs list includes only jobs that were
# submitted to the named cluster.
# @param [String] job_state_matcher
# [Optional] Specifies enumerated categories of jobs to list (default = match
# ALL jobs).
# @param [String] filter
# [Optional] A filter constraining the jobs to list. Filters are case-sensitive
# and have the following syntax: field:value] ... or [field = value] AND [field [
# = value]] ... where **field** is `status.state` or `labels.[KEY]`, and `[KEY]`
# is a label key. **value** can be `*` to match all values. `status.state` can
# be either `ACTIVE` or `INACTIVE`. Only the logical `AND` operator is supported;
# space-separated items are treated as having an implicit `AND` operator.
# Example valid filters are: status.state:ACTIVE labels.env:staging labels.
# starred:* and status.state = ACTIVE AND labels.env = staging AND labels.
# starred = *
# @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::DataprocV1::ListJobsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::ListJobsResponse]
#
# @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_jobs(project_id, region, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', options)
command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation
command.response_class = Google::Apis::DataprocV1::ListJobsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['clusterName'] = cluster_name unless cluster_name.nil?
command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Starts a job cancellation request. To access the job resource after
# cancellation, call [regions/`region`/jobs.list](/dataproc/reference/rest/v1/
# projects.regions.jobs/list) or [regions/`region`/jobs.get](/dataproc/reference/
# rest/v1/projects.regions.jobs/get).
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# @param [String] job_id
# [Required] The job ID.
# @param [Google::Apis::DataprocV1::CancelJobRequest] cancel_job_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::DataprocV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Job]
#
# @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_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options)
command.request_representation = Google::Apis::DataprocV1::CancelJobRequest::Representation
command.request_object = cancel_job_request_object
command.response_representation = Google::Apis::DataprocV1::Job::Representation
command.response_class = Google::Apis::DataprocV1::Job
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes the job from the project. If the job is active, the delete fails, and
# the response returns `FAILED_PRECONDITION`.
# @param [String] project_id
# [Required] The ID of the Google Cloud Platform project that the job belongs to.
# @param [String] region
# [Required] The Cloud Dataproc region in which to handle the request.
# @param [String] job_id
# [Required] The job ID.
# Starts asynchronous cancellation on a long-running operation. The server makes
# a best effort to cancel the operation, but success is not guaranteed. If the
# server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
# Clients can use Operations.GetOperation or other methods to check whether the
# cancellation succeeded or whether the operation completed despite cancellation.
# On successful cancellation, the operation is not deleted; instead, it becomes
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
# corresponding to Code.CANCELLED.
# @param [String] name
# The name of the operation resource to be cancelled.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -503,30 +597,61 @@ 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 delete_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
command.response_representation = Google::Apis::DataprocV1::Empty::Representation
command.response_class = Google::Apis::DataprocV1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a long-running operation. This method indicates that the client is no
# longer interested in the operation result. It does not cancel the operation.
# If the server doesn't support this method, it returns google.rpc.Code.
# UNIMPLEMENTED.
# @param [String] name
# The name of the operation resource to be deleted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::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_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::DataprocV1::Empty::Representation
command.response_class = Google::Apis::DataprocV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists operations that match the specified filter in the request. If the server
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
# binding below allows API services to override the binding to use different
# resource name schemes, such as `users/*/operations`.
# doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
# below allows API services to override the binding to use different resource
# name schemes, such as users/*/operations.
# @param [String] name
# The name of the operation collection.
# @param [String] filter
# The standard list filter.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] page_token
# The standard list page token.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] filter
# The standard list filter.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -544,14 +669,14 @@ 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 list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation
command.response_class = Google::Apis::DataprocV1::ListOperationsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
@ -587,76 +712,6 @@ module Google
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a long-running operation. This method indicates that the client is no
# longer interested in the operation result. It does not cancel the operation.
# If the server doesn't support this method, it returns `google.rpc.Code.
# UNIMPLEMENTED`.
# @param [String] name
# The name of the operation resource to be deleted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::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_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::DataprocV1::Empty::Representation
command.response_class = Google::Apis::DataprocV1::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
# Starts asynchronous cancellation on a long-running operation. The server makes
# a best effort to cancel the operation, but success is not guaranteed. If the
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
# Clients can use Operations.GetOperation or other methods to check whether the
# cancellation succeeded or whether the operation completed despite cancellation.
# On successful cancellation, the operation is not deleted; instead, it becomes
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
# corresponding to `Code.CANCELLED`.
# @param [String] name
# The name of the operation resource to be cancelled.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
command.response_representation = Google::Apis::DataprocV1::Empty::Representation
command.response_class = Google::Apis::DataprocV1::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
protected

View File

@ -26,13 +26,13 @@ module Google
# @see https://cloud.google.com/datastore/
module DatastoreV1
VERSION = 'V1'
REVISION = '20170123'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
REVISION = '20170206'
# View and manage your Google Cloud Datastore data
AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -22,25 +22,7 @@ module Google
module Apis
module DatastoreV1
class Value
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReadOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PropertyOrder
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitRequest
class AllocateIdsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -52,145 +34,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class RollbackRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class EntityResult
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GqlQueryParameter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ArrayValue
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Filter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BeginTransactionResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PartitionId
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class QueryResultBatch
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AllocateIdsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class KindExpression
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PropertyFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PathElement
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RollbackResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PropertyReference
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Projection
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MutationResult
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AllocateIdsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LookupResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BeginTransactionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Key
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RunQueryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Entity
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GqlQuery
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Mutation
class EntityResult
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -202,7 +52,19 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class RunQueryRequest
class Value
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PartitionId
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Entity
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -214,64 +76,160 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class QueryResultBatch
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PathElement
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GqlQueryParameter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BeginTransactionResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AllocateIdsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LookupResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RunQueryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BeginTransactionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PropertyOrder
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class KindExpression
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LatLng
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Key
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PropertyReference
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Projection
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ArrayValue
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Mutation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReadOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RollbackResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MutationResult
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GqlQuery
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Filter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RunQueryRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RollbackRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CompositeFilter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Value
class AllocateIdsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :string_value, as: 'stringValue'
property :array_value, as: 'arrayValue', class: Google::Apis::DatastoreV1::ArrayValue, decorator: Google::Apis::DatastoreV1::ArrayValue::Representation
property :entity_value, as: 'entityValue', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
property :meaning, as: 'meaning'
property :integer_value, as: 'integerValue'
property :double_value, as: 'doubleValue'
property :blob_value, :base64 => true, as: 'blobValue'
property :geo_point_value, as: 'geoPointValue', class: Google::Apis::DatastoreV1::LatLng, decorator: Google::Apis::DatastoreV1::LatLng::Representation
property :null_value, as: 'nullValue'
property :boolean_value, as: 'booleanValue'
property :key_value, as: 'keyValue', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
property :exclude_from_indexes, as: 'excludeFromIndexes'
property :timestamp_value, as: 'timestampValue'
end
end
class ReadOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :transaction, :base64 => true, as: 'transaction'
property :read_consistency, as: 'readConsistency'
end
end
class PropertyOrder
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :direction, as: 'direction'
property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
end
end
class CommitRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :transaction, :base64 => true, as: 'transaction'
property :mode, as: 'mode'
collection :mutations, as: 'mutations', class: Google::Apis::DatastoreV1::Mutation, decorator: Google::Apis::DatastoreV1::Mutation::Representation
collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
end
end
@ -279,27 +237,31 @@ module Google
class Query
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :limit, as: 'limit'
property :filter, as: 'filter', class: Google::Apis::DatastoreV1::Filter, decorator: Google::Apis::DatastoreV1::Filter::Representation
property :end_cursor, :base64 => true, as: 'endCursor'
collection :distinct_on, as: 'distinctOn', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
property :offset, as: 'offset'
collection :projection, as: 'projection', class: Google::Apis::DatastoreV1::Projection, decorator: Google::Apis::DatastoreV1::Projection::Representation
property :start_cursor, :base64 => true, as: 'startCursor'
collection :kind, as: 'kind', class: Google::Apis::DatastoreV1::KindExpression, decorator: Google::Apis::DatastoreV1::KindExpression::Representation
collection :distinct_on, as: 'distinctOn', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
collection :order, as: 'order', class: Google::Apis::DatastoreV1::PropertyOrder, decorator: Google::Apis::DatastoreV1::PropertyOrder::Representation
property :start_cursor, :base64 => true, as: 'startCursor'
collection :kind, as: 'kind', class: Google::Apis::DatastoreV1::KindExpression, decorator: Google::Apis::DatastoreV1::KindExpression::Representation
collection :projection, as: 'projection', class: Google::Apis::DatastoreV1::Projection, decorator: Google::Apis::DatastoreV1::Projection::Representation
property :end_cursor, :base64 => true, as: 'endCursor'
property :limit, as: 'limit'
property :filter, as: 'filter', class: Google::Apis::DatastoreV1::Filter, decorator: Google::Apis::DatastoreV1::Filter::Representation
end
end
class RollbackRequest
class PropertyFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :transaction, :base64 => true, as: 'transaction'
property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
property :op, as: 'op'
end
end
@ -307,35 +269,100 @@ module Google
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :cursor, :base64 => true, as: 'cursor'
property :version, as: 'version'
property :entity, as: 'entity', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
property :version, as: 'version'
end
end
class CommitResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :index_updates, as: 'indexUpdates'
collection :mutation_results, as: 'mutationResults', class: Google::Apis::DatastoreV1::MutationResult, decorator: Google::Apis::DatastoreV1::MutationResult::Representation
end
end
class Value
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :meaning, as: 'meaning'
property :array_value, as: 'arrayValue', class: Google::Apis::DatastoreV1::ArrayValue, decorator: Google::Apis::DatastoreV1::ArrayValue::Representation
property :entity_value, as: 'entityValue', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
property :geo_point_value, as: 'geoPointValue', class: Google::Apis::DatastoreV1::LatLng, decorator: Google::Apis::DatastoreV1::LatLng::Representation
property :key_value, as: 'keyValue', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
property :integer_value, as: 'integerValue'
property :string_value, as: 'stringValue'
property :exclude_from_indexes, as: 'excludeFromIndexes'
property :double_value, as: 'doubleValue'
property :timestamp_value, as: 'timestampValue'
property :boolean_value, as: 'booleanValue'
property :null_value, as: 'nullValue'
property :blob_value, :base64 => true, as: 'blobValue'
end
end
class PartitionId
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :project_id, as: 'projectId'
property :namespace_id, as: 'namespaceId'
end
end
class Entity
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
hash :properties, as: 'properties', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
end
end
class LookupRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1::ReadOptions, decorator: Google::Apis::DatastoreV1::ReadOptions::Representation
collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
end
end
class QueryResultBatch
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :more_results, as: 'moreResults'
property :end_cursor, :base64 => true, as: 'endCursor'
property :snapshot_version, as: 'snapshotVersion'
property :skipped_cursor, :base64 => true, as: 'skippedCursor'
property :skipped_results, as: 'skippedResults'
property :entity_result_type, as: 'entityResultType'
collection :entity_results, as: 'entityResults', class: Google::Apis::DatastoreV1::EntityResult, decorator: Google::Apis::DatastoreV1::EntityResult::Representation
end
end
class PathElement
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :name, as: 'name'
property :kind, as: 'kind'
end
end
class GqlQueryParameter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
property :cursor, :base64 => true, as: 'cursor'
end
end
class ArrayValue
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :values, as: 'values', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
end
end
class Filter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :property_filter, as: 'propertyFilter', class: Google::Apis::DatastoreV1::PropertyFilter, decorator: Google::Apis::DatastoreV1::PropertyFilter::Representation
property :composite_filter, as: 'compositeFilter', class: Google::Apis::DatastoreV1::CompositeFilter, decorator: Google::Apis::DatastoreV1::CompositeFilter::Representation
property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
end
end
@ -347,28 +374,6 @@ module Google
end
end
class PartitionId
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :namespace_id, as: 'namespaceId'
property :project_id, as: 'projectId'
end
end
class QueryResultBatch
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :snapshot_version, as: 'snapshotVersion'
property :end_cursor, :base64 => true, as: 'endCursor'
property :skipped_cursor, :base64 => true, as: 'skippedCursor'
property :entity_result_type, as: 'entityResultType'
property :more_results, as: 'moreResults'
collection :entity_results, as: 'entityResults', class: Google::Apis::DatastoreV1::EntityResult, decorator: Google::Apis::DatastoreV1::EntityResult::Representation
property :skipped_results, as: 'skippedResults'
end
end
class AllocateIdsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -377,72 +382,6 @@ module Google
end
end
class KindExpression
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
end
end
class PropertyFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
property :op, as: 'op'
property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
end
end
class PathElement
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :id, as: 'id'
property :name, as: 'name'
end
end
class RollbackResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class PropertyReference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
end
end
class Projection
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
end
end
class MutationResult
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :conflict_detected, as: 'conflictDetected'
property :key, as: 'key', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
property :version, as: 'version'
end
end
class AllocateIdsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
end
end
class LookupResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -455,12 +394,56 @@ module Google
end
end
class RunQueryResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch, as: 'batch', class: Google::Apis::DatastoreV1::QueryResultBatch, decorator: Google::Apis::DatastoreV1::QueryResultBatch::Representation
property :query, as: 'query', class: Google::Apis::DatastoreV1::Query, decorator: Google::Apis::DatastoreV1::Query::Representation
end
end
class CommitRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :transaction, :base64 => true, as: 'transaction'
property :mode, as: 'mode'
collection :mutations, as: 'mutations', class: Google::Apis::DatastoreV1::Mutation, decorator: Google::Apis::DatastoreV1::Mutation::Representation
end
end
class BeginTransactionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class PropertyOrder
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
property :direction, as: 'direction'
end
end
class KindExpression
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
end
end
class LatLng
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :longitude, as: 'longitude'
property :latitude, as: 'latitude'
end
end
class Key
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -471,34 +454,25 @@ module Google
end
end
class RunQueryResponse
class PropertyReference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch, as: 'batch', class: Google::Apis::DatastoreV1::QueryResultBatch, decorator: Google::Apis::DatastoreV1::QueryResultBatch::Representation
property :name, as: 'name'
end
end
property :query, as: 'query', class: Google::Apis::DatastoreV1::Query, decorator: Google::Apis::DatastoreV1::Query::Representation
class Projection
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
end
end
class Entity
class ArrayValue
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :properties, as: 'properties', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
property :key, as: 'key', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
end
end
class GqlQuery
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :query_string, as: 'queryString'
hash :named_bindings, as: 'namedBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation
property :allow_literals, as: 'allowLiterals'
collection :positional_bindings, as: 'positionalBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation
collection :values, as: 'values', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
end
end
@ -506,24 +480,61 @@ module Google
class Mutation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :delete, as: 'delete', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
property :insert, as: 'insert', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
property :base_version, as: 'baseVersion'
property :update, as: 'update', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
property :base_version, as: 'baseVersion'
property :upsert, as: 'upsert', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
property :delete, as: 'delete', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
end
end
class CommitResponse
class ReadOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :mutation_results, as: 'mutationResults', class: Google::Apis::DatastoreV1::MutationResult, decorator: Google::Apis::DatastoreV1::MutationResult::Representation
property :read_consistency, as: 'readConsistency'
property :transaction, :base64 => true, as: 'transaction'
end
end
class RollbackResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class MutationResult
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
property :version, as: 'version'
property :conflict_detected, as: 'conflictDetected'
end
end
class GqlQuery
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :query_string, as: 'queryString'
property :allow_literals, as: 'allowLiterals'
hash :named_bindings, as: 'namedBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation
collection :positional_bindings, as: 'positionalBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation
end
end
class Filter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :property_filter, as: 'propertyFilter', class: Google::Apis::DatastoreV1::PropertyFilter, decorator: Google::Apis::DatastoreV1::PropertyFilter::Representation
property :composite_filter, as: 'compositeFilter', class: Google::Apis::DatastoreV1::CompositeFilter, decorator: Google::Apis::DatastoreV1::CompositeFilter::Representation
property :index_updates, as: 'indexUpdates'
end
end
@ -541,21 +552,10 @@ module Google
end
end
class LookupRequest
class RollbackRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1::ReadOptions, decorator: Google::Apis::DatastoreV1::ReadOptions::Representation
collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
end
end
class LatLng
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :latitude, as: 'latitude'
property :longitude, as: 'longitude'
property :transaction, :base64 => true, as: 'transaction'
end
end

View File

@ -51,11 +51,11 @@ module Google
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::RunQueryRequest] run_query_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -68,149 +68,15 @@ 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 run_project_query(project_id, run_query_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:runQuery', options)
command.request_representation = Google::Apis::DatastoreV1::RunQueryRequest::Representation
command.request_object = run_query_request_object
command.response_representation = Google::Apis::DatastoreV1::RunQueryResponse::Representation
command.response_class = Google::Apis::DatastoreV1::RunQueryResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Begins a new transaction.
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::BeginTransactionRequest] begin_transaction_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DatastoreV1::BeginTransactionResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::BeginTransactionResponse]
#
# @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 begin_project_transaction(project_id, begin_transaction_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:beginTransaction', options)
command.request_representation = Google::Apis::DatastoreV1::BeginTransactionRequest::Representation
command.request_object = begin_transaction_request_object
command.response_representation = Google::Apis::DatastoreV1::BeginTransactionResponse::Representation
command.response_class = Google::Apis::DatastoreV1::BeginTransactionResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Allocates IDs for the given keys, which is useful for referencing an entity
# before it is inserted.
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::AllocateIdsRequest] allocate_ids_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DatastoreV1::AllocateIdsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::AllocateIdsResponse]
#
# @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 allocate_project_ids(project_id, allocate_ids_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:allocateIds', options)
command.request_representation = Google::Apis::DatastoreV1::AllocateIdsRequest::Representation
command.request_object = allocate_ids_request_object
command.response_representation = Google::Apis::DatastoreV1::AllocateIdsResponse::Representation
command.response_class = Google::Apis::DatastoreV1::AllocateIdsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Looks up entities by key.
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::LookupRequest] lookup_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DatastoreV1::LookupResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::LookupResponse]
#
# @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 lookup_project(project_id, lookup_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:lookup', options)
command.request_representation = Google::Apis::DatastoreV1::LookupRequest::Representation
command.request_object = lookup_request_object
command.response_representation = Google::Apis::DatastoreV1::LookupResponse::Representation
command.response_class = Google::Apis::DatastoreV1::LookupResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Commits a transaction, optionally creating, deleting or modifying some
# entities.
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::CommitRequest] commit_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DatastoreV1::CommitResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::CommitResponse]
#
# @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 commit_project(project_id, commit_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:commit', options)
command.request_representation = Google::Apis::DatastoreV1::CommitRequest::Representation
command.request_object = commit_request_object
command.response_representation = Google::Apis::DatastoreV1::CommitResponse::Representation
command.response_class = Google::Apis::DatastoreV1::CommitResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -218,11 +84,11 @@ module Google
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::RollbackRequest] rollback_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -235,15 +101,149 @@ 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 rollback_project(project_id, rollback_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:rollback', options)
command.request_representation = Google::Apis::DatastoreV1::RollbackRequest::Representation
command.request_object = rollback_request_object
command.response_representation = Google::Apis::DatastoreV1::RollbackResponse::Representation
command.response_class = Google::Apis::DatastoreV1::RollbackResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Looks up entities by key.
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::LookupRequest] lookup_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::DatastoreV1::LookupResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::LookupResponse]
#
# @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 lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:lookup', options)
command.request_representation = Google::Apis::DatastoreV1::LookupRequest::Representation
command.request_object = lookup_request_object
command.response_representation = Google::Apis::DatastoreV1::LookupResponse::Representation
command.response_class = Google::Apis::DatastoreV1::LookupResponse
command.params['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
# Allocates IDs for the given keys, which is useful for referencing an entity
# before it is inserted.
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::AllocateIdsRequest] allocate_ids_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::DatastoreV1::AllocateIdsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::AllocateIdsResponse]
#
# @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 allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:allocateIds', options)
command.request_representation = Google::Apis::DatastoreV1::AllocateIdsRequest::Representation
command.request_object = allocate_ids_request_object
command.response_representation = Google::Apis::DatastoreV1::AllocateIdsResponse::Representation
command.response_class = Google::Apis::DatastoreV1::AllocateIdsResponse
command.params['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
# Begins a new transaction.
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::BeginTransactionRequest] begin_transaction_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::DatastoreV1::BeginTransactionResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::BeginTransactionResponse]
#
# @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 begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:beginTransaction', options)
command.request_representation = Google::Apis::DatastoreV1::BeginTransactionRequest::Representation
command.request_object = begin_transaction_request_object
command.response_representation = Google::Apis::DatastoreV1::BeginTransactionResponse::Representation
command.response_class = Google::Apis::DatastoreV1::BeginTransactionResponse
command.params['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
# Commits a transaction, optionally creating, deleting or modifying some
# entities.
# @param [String] project_id
# The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::CommitRequest] commit_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::DatastoreV1::CommitResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::CommitResponse]
#
# @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 commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:commit', options)
command.request_representation = Google::Apis::DatastoreV1::CommitRequest::Representation
command.request_object = commit_request_object
command.response_representation = Google::Apis::DatastoreV1::CommitResponse::Representation
command.response_class = Google::Apis::DatastoreV1::CommitResponse
command.params['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

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/doubleclick-search/
module DoubleclicksearchV2
VERSION = 'V2'
REVISION = '20170131'
REVISION = '20170207'
# View and manage your advertising data in DoubleClick Search
AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch'

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/drive/
module DriveV2
VERSION = 'V2'
REVISION = '20170131'
REVISION = '20170207'
# View and manage the files in your Google Drive
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/drive/
module DriveV3
VERSION = 'V3'
REVISION = '20170131'
REVISION = '20170207'
# View and manage the files in your Google Drive
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/games/services
module GamesConfigurationV1configuration
VERSION = 'V1configuration'
REVISION = '20170126'
REVISION = '20170201'
# View and manage your Google Play Developer account
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/games/services
module GamesManagementV1management
VERSION = 'V1management'
REVISION = '20170126'
REVISION = '20170201'
# Share your Google+ profile information and view and manage your game activity
AUTH_GAMES = 'https://www.googleapis.com/auth/games'

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/games/services/
module GamesV1
VERSION = 'V1'
REVISION = '20170126'
REVISION = '20170201'
# View and manage its own configuration data in your Google Drive
AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'

View File

@ -25,7 +25,13 @@ module Google
# @see https://cloud.google.com/genomics
module GenomicsV1
VERSION = 'V1'
REVISION = '20170202'
REVISION = '20170211'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# View Genomics data
AUTH_GENOMICS_READONLY = 'https://www.googleapis.com/auth/genomics.readonly'
# View and manage Genomics data
AUTH_GENOMICS = 'https://www.googleapis.com/auth/genomics'
@ -35,12 +41,6 @@ module Google
# Manage your data in Google Cloud Storage
AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# View Genomics data
AUTH_GENOMICS_READONLY = 'https://www.googleapis.com/auth/genomics.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,30 @@ module Google
module Apis
module GenomicsV1
class SearchAnnotationSetsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ImportVariantsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListCoverageBucketsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class VariantAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ExportVariantSetRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -178,13 +202,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class RuntimeMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RuntimeMetadata
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -220,13 +244,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Binding
class UndeleteDatasetRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UndeleteDatasetRequest
class Binding
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -256,7 +280,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SearchCallSetsResponse
class ListOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -268,13 +292,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class OperationMetadata
class SearchCallSetsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -286,6 +304,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class OperationMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SearchReadGroupSetsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -298,13 +322,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ClinicalCondition
class SearchReadsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SearchReadsResponse
class ClinicalCondition
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -334,7 +358,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Reference
class SearchVariantSetsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -346,7 +370,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SearchVariantSetsRequest
class Reference
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -394,13 +418,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AnnotationSet
class Transcript
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Transcript
class AnnotationSet
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -424,13 +448,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Exon
class ExportReadGroupSetRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ExportReadGroupSetRequest
class Exon
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -443,27 +467,47 @@ module Google
end
class SearchAnnotationSetsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :annotation_sets, as: 'annotationSets', class: Google::Apis::GenomicsV1::AnnotationSet, decorator: Google::Apis::GenomicsV1::AnnotationSet::Representation
include Google::Apis::Core::JsonObjectSupport
property :next_page_token, as: 'nextPageToken'
end
end
class ImportVariantsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class VariantAnnotation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :info_merge_config, as: 'infoMergeConfig'
property :variant_set_id, as: 'variantSetId'
collection :source_uris, as: 'sourceUris'
property :normalize_reference_names, as: 'normalizeReferenceNames'
property :format, as: 'format'
end
end
class ListCoverageBucketsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
property :bucket_width, as: 'bucketWidth'
collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1::CoverageBucket, decorator: Google::Apis::GenomicsV1::CoverageBucket::Representation
include Google::Apis::Core::JsonObjectSupport
end
end
class VariantAnnotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :effect, as: 'effect'
collection :transcript_ids, as: 'transcriptIds'
property :type, as: 'type'
property :alternate_bases, as: 'alternateBases'
property :gene_id, as: 'geneId'
property :clinical_significance, as: 'clinicalSignificance'
collection :conditions, as: 'conditions', class: Google::Apis::GenomicsV1::ClinicalCondition, decorator: Google::Apis::GenomicsV1::ClinicalCondition::Representation
end
end
class ExportVariantSetRequest
@ -480,13 +524,13 @@ module Google
class SearchAnnotationsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end, as: 'end'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
property :start, as: 'start'
collection :annotation_set_ids, as: 'annotationSetIds'
property :reference_name, as: 'referenceName'
property :reference_id, as: 'referenceId'
property :end, as: 'end'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
end
end
@ -502,8 +546,8 @@ module Google
class CodingSequence
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end, as: 'end'
property :start, as: 'start'
property :end, as: 'end'
end
end
@ -544,41 +588,41 @@ module Google
class SearchReadGroupSetsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :read_group_sets, as: 'readGroupSets', class: Google::Apis::GenomicsV1::ReadGroupSet, decorator: Google::Apis::GenomicsV1::ReadGroupSet::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class LinearAlignment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :mapping_quality, as: 'mappingQuality'
property :position, as: 'position', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation
collection :cigar, as: 'cigar', class: Google::Apis::GenomicsV1::CigarUnit, decorator: Google::Apis::GenomicsV1::CigarUnit::Representation
property :mapping_quality, as: 'mappingQuality'
end
end
class SearchReferencesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :md5checksums, as: 'md5checksums'
collection :accessions, as: 'accessions'
property :page_token, as: 'pageToken'
property :reference_set_id, as: 'referenceSetId'
property :page_size, as: 'pageSize'
collection :md5checksums, as: 'md5checksums'
end
end
class Dataset
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :project_id, as: 'projectId'
property :id, as: 'id'
property :create_time, as: 'createTime'
property :name, as: 'name'
end
end
@ -592,6 +636,12 @@ module Google
class ReadGroup
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :programs, as: 'programs', class: Google::Apis::GenomicsV1::Program, decorator: Google::Apis::GenomicsV1::Program::Representation
property :predicted_insert_size, as: 'predictedInsertSize'
property :description, as: 'description'
property :sample_id, as: 'sampleId'
property :dataset_id, as: 'datasetId'
property :experiment, as: 'experiment', class: Google::Apis::GenomicsV1::Experiment, decorator: Google::Apis::GenomicsV1::Experiment::Representation
@ -602,23 +652,12 @@ module Google
items
end
property :id, as: 'id'
property :predicted_insert_size, as: 'predictedInsertSize'
collection :programs, as: 'programs', class: Google::Apis::GenomicsV1::Program, decorator: Google::Apis::GenomicsV1::Program::Representation
property :description, as: 'description'
property :sample_id, as: 'sampleId'
end
end
class ReadGroupSet
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :filename, as: 'filename'
collection :read_groups, as: 'readGroups', class: Google::Apis::GenomicsV1::ReadGroup, decorator: Google::Apis::GenomicsV1::ReadGroup::Representation
property :name, as: 'name'
property :reference_set_id, as: 'referenceSetId'
hash :info, as: 'info', :class => Array do
include Representable::JSON::Collection
items
@ -626,6 +665,11 @@ module Google
property :id, as: 'id'
property :dataset_id, as: 'datasetId'
collection :read_groups, as: 'readGroups', class: Google::Apis::GenomicsV1::ReadGroup, decorator: Google::Apis::GenomicsV1::ReadGroup::Representation
property :filename, as: 'filename'
property :name, as: 'name'
property :reference_set_id, as: 'referenceSetId'
end
end
@ -657,9 +701,9 @@ module Google
class Position
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :reverse_strand, as: 'reverseStrand'
property :position, as: 'position'
property :reference_name, as: 'referenceName'
property :reverse_strand, as: 'reverseStrand'
end
end
@ -675,30 +719,30 @@ module Google
class SearchCallSetsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
collection :variant_set_ids, as: 'variantSetIds'
property :name, as: 'name'
property :page_token, as: 'pageToken'
end
end
class ImportReadGroupSetsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :reference_set_id, as: 'referenceSetId'
property :partition_strategy, as: 'partitionStrategy'
property :dataset_id, as: 'datasetId'
collection :source_uris, as: 'sourceUris'
property :reference_set_id, as: 'referenceSetId'
end
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :bindings, as: 'bindings', class: Google::Apis::GenomicsV1::Binding, decorator: Google::Apis::GenomicsV1::Binding::Representation
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
collection :bindings, as: 'bindings', class: Google::Apis::GenomicsV1::Binding, decorator: Google::Apis::GenomicsV1::Binding::Representation
end
end
@ -724,36 +768,24 @@ module Google
class Annotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :annotation_set_id, as: 'annotationSetId'
property :name, as: 'name'
property :variant, as: 'variant', class: Google::Apis::GenomicsV1::VariantAnnotation, decorator: Google::Apis::GenomicsV1::VariantAnnotation::Representation
property :id, as: 'id'
property :reference_id, as: 'referenceId'
property :reverse_strand, as: 'reverseStrand'
property :reference_name, as: 'referenceName'
property :type, as: 'type'
hash :info, as: 'info', :class => Array do
include Representable::JSON::Collection
items
end
property :type, as: 'type'
property :end, as: 'end'
property :transcript, as: 'transcript', class: Google::Apis::GenomicsV1::Transcript, decorator: Google::Apis::GenomicsV1::Transcript::Representation
property :start, as: 'start'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :response, as: 'response'
property :annotation_set_id, as: 'annotationSetId'
property :name, as: 'name'
property :error, as: 'error', class: Google::Apis::GenomicsV1::Status, decorator: Google::Apis::GenomicsV1::Status::Representation
property :variant, as: 'variant', class: Google::Apis::GenomicsV1::VariantAnnotation, decorator: Google::Apis::GenomicsV1::VariantAnnotation::Representation
hash :metadata, as: 'metadata'
property :done, as: 'done'
property :reference_id, as: 'referenceId'
property :id, as: 'id'
property :reverse_strand, as: 'reverseStrand'
end
end
@ -765,6 +797,18 @@ module Google
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
hash :response, as: 'response'
property :name, as: 'name'
property :error, as: 'error', class: Google::Apis::GenomicsV1::Status, decorator: Google::Apis::GenomicsV1::Status::Representation
hash :metadata, as: 'metadata'
end
end
class ImportReadGroupSetsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -775,16 +819,16 @@ module Google
class VariantCall
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :call_set_name, as: 'callSetName'
collection :genotype_likelihood, as: 'genotypeLikelihood'
property :call_set_id, as: 'callSetId'
collection :genotype, as: 'genotype'
property :phaseset, as: 'phaseset'
hash :info, as: 'info', :class => Array do
include Representable::JSON::Collection
items
end
property :call_set_name, as: 'callSetName'
collection :genotype_likelihood, as: 'genotypeLikelihood'
property :call_set_id, as: 'callSetId'
collection :genotype, as: 'genotype'
end
end
@ -815,20 +859,20 @@ module Google
end
end
class Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :members, as: 'members'
property :role, as: 'role'
end
end
class UndeleteDatasetRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :role, as: 'role'
collection :members, as: 'members'
end
end
class Range
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -841,7 +885,6 @@ module Google
class VariantSet
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :dataset_id, as: 'datasetId'
property :name, as: 'name'
property :reference_set_id, as: 'referenceSetId'
collection :metadata, as: 'metadata', class: Google::Apis::GenomicsV1::VariantSetMetadata, decorator: Google::Apis::GenomicsV1::VariantSetMetadata::Representation
@ -850,6 +893,7 @@ module Google
property :id, as: 'id'
property :description, as: 'description'
property :dataset_id, as: 'datasetId'
end
end
@ -864,41 +908,8 @@ module Google
class ReferenceBound
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :reference_name, as: 'referenceName'
property :upper_bound, as: 'upperBound'
end
end
class SearchCallSetsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :call_sets, as: 'callSets', class: Google::Apis::GenomicsV1::CallSet, decorator: Google::Apis::GenomicsV1::CallSet::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class Variant
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :quality, as: 'quality'
property :id, as: 'id'
property :variant_set_id, as: 'variantSetId'
property :reference_name, as: 'referenceName'
hash :info, as: 'info', :class => Array do
include Representable::JSON::Collection
items
end
property :reference_bases, as: 'referenceBases'
collection :names, as: 'names'
collection :alternate_bases, as: 'alternateBases'
collection :filter, as: 'filter'
property :end, as: 'end'
collection :calls, as: 'calls', class: Google::Apis::GenomicsV1::VariantCall, decorator: Google::Apis::GenomicsV1::VariantCall::Representation
property :created, as: 'created'
property :start, as: 'start'
end
end
@ -911,18 +922,35 @@ module Google
end
end
class OperationMetadata
class Variant
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :start_time, as: 'startTime'
hash :request, as: 'request'
hash :runtime_metadata, as: 'runtimeMetadata'
hash :labels, as: 'labels'
property :create_time, as: 'createTime'
property :project_id, as: 'projectId'
property :client_id, as: 'clientId'
property :end_time, as: 'endTime'
collection :events, as: 'events', class: Google::Apis::GenomicsV1::OperationEvent, decorator: Google::Apis::GenomicsV1::OperationEvent::Representation
collection :alternate_bases, as: 'alternateBases'
collection :names, as: 'names'
property :end, as: 'end'
collection :filter, as: 'filter'
collection :calls, as: 'calls', class: Google::Apis::GenomicsV1::VariantCall, decorator: Google::Apis::GenomicsV1::VariantCall::Representation
property :created, as: 'created'
property :start, as: 'start'
property :quality, as: 'quality'
property :id, as: 'id'
property :variant_set_id, as: 'variantSetId'
property :reference_name, as: 'referenceName'
hash :info, as: 'info', :class => Array do
include Representable::JSON::Collection
items
end
property :reference_bases, as: 'referenceBases'
end
end
class SearchCallSetsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :call_sets, as: 'callSets', class: Google::Apis::GenomicsV1::CallSet, decorator: Google::Apis::GenomicsV1::CallSet::Representation
end
end
@ -933,22 +961,38 @@ module Google
property :reference_name, as: 'referenceName'
collection :variant_set_ids, as: 'variantSetIds'
property :end, as: 'end'
property :page_token, as: 'pageToken'
property :max_calls, as: 'maxCalls'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
collection :call_set_ids, as: 'callSetIds'
property :variant_name, as: 'variantName'
property :start, as: 'start'
property :variant_name, as: 'variantName'
end
end
class OperationMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :request, as: 'request'
hash :runtime_metadata, as: 'runtimeMetadata'
hash :labels, as: 'labels'
property :create_time, as: 'createTime'
property :project_id, as: 'projectId'
property :client_id, as: 'clientId'
property :end_time, as: 'endTime'
collection :events, as: 'events', class: Google::Apis::GenomicsV1::OperationEvent, decorator: Google::Apis::GenomicsV1::OperationEvent::Representation
property :start_time, as: 'startTime'
end
end
class SearchReadGroupSetsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dataset_ids, as: 'datasetIds'
property :name, as: 'name'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
collection :dataset_ids, as: 'datasetIds'
end
end
@ -961,17 +1005,6 @@ module Google
end
end
class ClinicalCondition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :names, as: 'names'
property :omim_id, as: 'omimId'
collection :external_ids, as: 'externalIds', class: Google::Apis::GenomicsV1::ExternalId, decorator: Google::Apis::GenomicsV1::ExternalId::Representation
property :concept_id, as: 'conceptId'
end
end
class SearchReadsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -981,14 +1014,25 @@ module Google
end
end
class ClinicalCondition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :omim_id, as: 'omimId'
collection :external_ids, as: 'externalIds', class: Google::Apis::GenomicsV1::ExternalId, decorator: Google::Apis::GenomicsV1::ExternalId::Representation
property :concept_id, as: 'conceptId'
collection :names, as: 'names'
end
end
class Program
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :command_line, as: 'commandLine'
property :prev_program_id, as: 'prevProgramId'
property :id, as: 'id'
property :version, as: 'version'
property :name, as: 'name'
end
end
@ -1004,10 +1048,10 @@ module Google
class ComputeEngine
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :zone, as: 'zone'
property :machine_type, as: 'machineType'
collection :disk_names, as: 'diskNames'
property :instance_name, as: 'instanceName'
property :zone, as: 'zone'
end
end
@ -1019,53 +1063,53 @@ module Google
end
end
class Reference
class SearchVariantSetsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :md5checksum, as: 'md5checksum'
property :id, as: 'id'
property :length, as: 'length'
collection :source_accessions, as: 'sourceAccessions'
property :ncbi_taxon_id, as: 'ncbiTaxonId'
property :source_uri, as: 'sourceUri'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
collection :dataset_ids, as: 'datasetIds'
end
end
class VariantSetMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
hash :info, as: 'info', :class => Array do
include Representable::JSON::Collection
items
end
property :type, as: 'type'
property :number, as: 'number'
property :id, as: 'id'
property :value, as: 'value'
property :id, as: 'id'
property :number, as: 'number'
property :key, as: 'key'
property :description, as: 'description'
end
end
class SearchVariantSetsRequest
class Reference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :dataset_ids, as: 'datasetIds'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
collection :source_accessions, as: 'sourceAccessions'
property :ncbi_taxon_id, as: 'ncbiTaxonId'
property :source_uri, as: 'sourceUri'
property :name, as: 'name'
property :md5checksum, as: 'md5checksum'
property :id, as: 'id'
property :length, as: 'length'
end
end
class SearchReferenceSetsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :assembly_id, as: 'assemblyId'
collection :md5checksums, as: 'md5checksums'
collection :accessions, as: 'accessions'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
property :assembly_id, as: 'assemblyId'
end
end
@ -1080,10 +1124,10 @@ module Google
class MergeVariantsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :variant_set_id, as: 'variantSetId'
collection :variants, as: 'variants', class: Google::Apis::GenomicsV1::Variant, decorator: Google::Apis::GenomicsV1::Variant::Representation
hash :info_merge_config, as: 'infoMergeConfig'
property :variant_set_id, as: 'variantSetId'
end
end
@ -1106,8 +1150,8 @@ module Google
collection :aligned_quality, as: 'alignedQuality'
property :alignment, as: 'alignment', class: Google::Apis::GenomicsV1::LinearAlignment, decorator: Google::Apis::GenomicsV1::LinearAlignment::Representation
property :id, as: 'id'
property :number_reads, as: 'numberReads'
property :id, as: 'id'
property :secondary_alignment, as: 'secondaryAlignment'
property :fragment_name, as: 'fragmentName'
property :read_group_set_id, as: 'readGroupSetId'
@ -1128,29 +1172,41 @@ module Google
class ReferenceSet
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :source_accessions, as: 'sourceAccessions'
property :description, as: 'description'
property :source_uri, as: 'sourceUri'
property :ncbi_taxon_id, as: 'ncbiTaxonId'
collection :reference_ids, as: 'referenceIds'
property :md5checksum, as: 'md5checksum'
property :assembly_id, as: 'assemblyId'
property :id, as: 'id'
collection :source_accessions, as: 'sourceAccessions'
property :description, as: 'description'
end
end
class CigarUnit
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :operation, as: 'operation'
property :reference_sequence, as: 'referenceSequence'
property :operation_length, as: 'operationLength'
property :operation, as: 'operation'
end
end
class Transcript
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :gene_id, as: 'geneId'
collection :exons, as: 'exons', class: Google::Apis::GenomicsV1::Exon, decorator: Google::Apis::GenomicsV1::Exon::Representation
property :coding_sequence, as: 'codingSequence', class: Google::Apis::GenomicsV1::CodingSequence, decorator: Google::Apis::GenomicsV1::CodingSequence::Representation
end
end
class AnnotationSet
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :source_uri, as: 'sourceUri'
property :dataset_id, as: 'datasetId'
property :name, as: 'name'
@ -1161,18 +1217,6 @@ module Google
end
property :type, as: 'type'
property :id, as: 'id'
end
end
class Transcript
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :exons, as: 'exons', class: Google::Apis::GenomicsV1::Exon, decorator: Google::Apis::GenomicsV1::Exon::Representation
property :coding_sequence, as: 'codingSequence', class: Google::Apis::GenomicsV1::CodingSequence, decorator: Google::Apis::GenomicsV1::CodingSequence::Representation
property :gene_id, as: 'geneId'
end
end
@ -1202,15 +1246,6 @@ module Google
end
end
class Exon
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end, as: 'end'
property :frame, as: 'frame'
property :start, as: 'start'
end
end
class ExportReadGroupSetRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1220,9 +1255,19 @@ module Google
end
end
class Exon
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :start, as: 'start'
property :end, as: 'end'
property :frame, as: 'frame'
end
end
class CallSet
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :variant_set_ids, as: 'variantSetIds'
property :id, as: 'id'
property :created, as: 'created'
property :sample_id, as: 'sampleId'
@ -1232,51 +1277,6 @@ module Google
items
end
collection :variant_set_ids, as: 'variantSetIds'
end
end
class SearchAnnotationSetsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :annotation_sets, as: 'annotationSets', class: Google::Apis::GenomicsV1::AnnotationSet, decorator: Google::Apis::GenomicsV1::AnnotationSet::Representation
end
end
class ImportVariantsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :format, as: 'format'
hash :info_merge_config, as: 'infoMergeConfig'
property :variant_set_id, as: 'variantSetId'
collection :source_uris, as: 'sourceUris'
property :normalize_reference_names, as: 'normalizeReferenceNames'
end
end
class VariantAnnotation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :transcript_ids, as: 'transcriptIds'
property :type, as: 'type'
property :alternate_bases, as: 'alternateBases'
property :gene_id, as: 'geneId'
property :clinical_significance, as: 'clinicalSignificance'
collection :conditions, as: 'conditions', class: Google::Apis::GenomicsV1::ClinicalCondition, decorator: Google::Apis::GenomicsV1::ClinicalCondition::Representation
property :effect, as: 'effect'
end
end
class ListCoverageBucketsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
property :bucket_width, as: 'bucketWidth'
collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1::CoverageBucket, decorator: Google::Apis::GenomicsV1::CoverageBucket::Representation
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/gmail/api/
module GmailV1
VERSION = 'V1'
REVISION = '20170131'
REVISION = '20170206'
# View and manage your mail
AUTH_SCOPE = 'https://mail.google.com/'

View File

@ -22,367 +22,6 @@ module Google
module Apis
module IamV1
# Represents a service account key.
# A service account has two sets of key-pairs: user-managed, and
# system-managed.
# User-managed key-pairs can be created and deleted by users. Users are
# responsible for rotating these keys periodically to ensure security of
# their service accounts. Users retain the private key of these key-pairs,
# and Google retains ONLY the public key.
# System-managed key-pairs are managed automatically by Google, and rotated
# daily without user intervention. The private key never leaves Google's
# servers to maximize security.
# Public keys for all service accounts are also published at the OAuth2
# Service Account API.
class ServiceAccountKey
include Google::Apis::Core::Hashable
# The key can be used after this timestamp.
# Corresponds to the JSON property `validAfterTime`
# @return [String]
attr_accessor :valid_after_time
# The output format for the private key.
# Only provided in `CreateServiceAccountKey` responses, not
# in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
# Google never exposes system-managed private keys, and never retains
# user-managed private keys.
# Corresponds to the JSON property `privateKeyType`
# @return [String]
attr_accessor :private_key_type
# The private key data. Only provided in `CreateServiceAccountKey`
# responses.
# Corresponds to the JSON property `privateKeyData`
# @return [String]
attr_accessor :private_key_data
# The public key data. Only provided in `GetServiceAccountKey` responses.
# Corresponds to the JSON property `publicKeyData`
# @return [String]
attr_accessor :public_key_data
# The resource name of the service account key in the following format
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The key can be used before this timestamp.
# Corresponds to the JSON property `validBeforeTime`
# @return [String]
attr_accessor :valid_before_time
# Specifies the algorithm (and possibly key size) for the key.
# Corresponds to the JSON property `keyAlgorithm`
# @return [String]
attr_accessor :key_algorithm
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@valid_after_time = args[:valid_after_time] if args.key?(:valid_after_time)
@private_key_type = args[:private_key_type] if args.key?(:private_key_type)
@private_key_data = args[:private_key_data] if args.key?(:private_key_data)
@public_key_data = args[:public_key_data] if args.key?(:public_key_data)
@name = args[:name] if args.key?(:name)
@valid_before_time = args[:valid_before_time] if args.key?(:valid_before_time)
@key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm)
end
end
# The service account key create request.
class CreateServiceAccountKeyRequest
include Google::Apis::Core::Hashable
# The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the
# default output format.
# Corresponds to the JSON property `privateKeyType`
# @return [String]
attr_accessor :private_key_type
# Which type of key and algorithm to use for the key.
# The default is currently a 4K RSA key. However this may change in the
# future.
# Corresponds to the JSON property `keyAlgorithm`
# @return [String]
attr_accessor :key_algorithm
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@private_key_type = args[:private_key_type] if args.key?(:private_key_type)
@key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm)
end
end
# The service account sign JWT response.
class SignJwtResponse
include Google::Apis::Core::Hashable
# The id of the key used to sign the JWT.
# Corresponds to the JSON property `keyId`
# @return [String]
attr_accessor :key_id
# The signed JWT.
# Corresponds to the JSON property `signedJwt`
# @return [String]
attr_accessor :signed_jwt
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key_id = args[:key_id] if args.key?(:key_id)
@signed_jwt = args[:signed_jwt] if args.key?(:signed_jwt)
end
end
# The service account sign blob response.
class SignBlobResponse
include Google::Apis::Core::Hashable
# The signed blob.
# Corresponds to the JSON property `signature`
# @return [String]
attr_accessor :signature
# The id of the key used to sign the blob.
# Corresponds to the JSON property `keyId`
# @return [String]
attr_accessor :key_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@signature = args[:signature] if args.key?(:signature)
@key_id = args[:key_id] if args.key?(:key_id)
end
end
# Request message for `TestIamPermissions` method.
class TestIamPermissionsRequest
include Google::Apis::Core::Hashable
# The set of permissions to check for the `resource`. Permissions with
# wildcards (such as '*' or 'storage.*') are not allowed. For more
# information see
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
# **Example**
# `
# "bindings": [
# `
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# `,
# `
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# `
# ]
# `
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
class Policy
include Google::Apis::Core::Hashable
# `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the
# read-modify-write cycle to perform policy updates in order to avoid race
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten blindly.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Version of the `Policy`. The default version is 0.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
# Associates a list of `members` to a `role`.
# Multiple `bindings` must not be specified for the same `role`.
# `bindings` with no members will result in an error.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::IamV1::Binding>]
attr_accessor :bindings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] if args.key?(:etag)
@version = args[:version] if args.key?(:version)
@bindings = args[:bindings] if args.key?(:bindings)
end
end
# The service account sign JWT request.
class SignJwtRequest
include Google::Apis::Core::Hashable
# The JWT payload to sign, a JSON JWT Claim set.
# Corresponds to the JSON property `payload`
# @return [String]
attr_accessor :payload
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@payload = args[:payload] if args.key?(:payload)
end
end
# Audit log information specific to Cloud IAM. This message is serialized
# as an `Any` type in the `ServiceData` message of an
# `AuditLog` message.
class AuditData
include Google::Apis::Core::Hashable
# The difference delta between two policies.
# Corresponds to the JSON property `policyDelta`
# @return [Google::Apis::IamV1::PolicyDelta]
attr_accessor :policy_delta
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@policy_delta = args[:policy_delta] if args.key?(:policy_delta)
end
end
# One delta entry for Binding. Each individual change (only one member in each
# entry) to a binding will be a separate entry.
class BindingDelta
include Google::Apis::Core::Hashable
# The action that was performed on a Binding.
# Required
# Corresponds to the JSON property `action`
# @return [String]
attr_accessor :action
# A single identity requesting access for a Cloud Platform resource.
# Follows the same format of Binding.members.
# Required
# Corresponds to the JSON property `member`
# @return [String]
attr_accessor :member
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@action = args[:action] if args.key?(:action)
@member = args[:member] if args.key?(:member)
@role = args[:role] if args.key?(:role)
end
end
# The difference delta between two policies.
class PolicyDelta
include Google::Apis::Core::Hashable
# The delta for Bindings between two policies.
# Corresponds to the JSON property `bindingDeltas`
# @return [Array<Google::Apis::IamV1::BindingDelta>]
attr_accessor :binding_deltas
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@binding_deltas = args[:binding_deltas] if args.key?(:binding_deltas)
end
end
# The service account list response.
class ListServiceAccountsResponse
include Google::Apis::Core::Hashable
# To retrieve the next page of results, set
# ListServiceAccountsRequest.page_token
# to this value.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The list of matching service accounts.
# Corresponds to the JSON property `accounts`
# @return [Array<Google::Apis::IamV1::ServiceAccount>]
attr_accessor :accounts
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@accounts = args[:accounts] if args.key?(:accounts)
end
end
# The service account create request.
class CreateServiceAccountRequest
include Google::Apis::Core::Hashable
@ -424,6 +63,33 @@ module Google
end
end
# The service account list response.
class ListServiceAccountsResponse
include Google::Apis::Core::Hashable
# The list of matching service accounts.
# Corresponds to the JSON property `accounts`
# @return [Array<Google::Apis::IamV1::ServiceAccount>]
attr_accessor :accounts
# To retrieve the next page of results, set
# ListServiceAccountsRequest.page_token
# to this value.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@accounts = args[:accounts] if args.key?(:accounts)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# The grantable role query response.
class QueryGrantableRolesResponse
include Google::Apis::Core::Hashable
@ -466,6 +132,12 @@ module Google
class Role
include Google::Apis::Core::Hashable
# Optional. A human-readable title for the role. Typically this
# is limited to 100 UTF-8 bytes.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
# The name of the role.
# When Role is used in CreateRole, the role name must not be set.
# When Role is used in output and other input such as UpdateRole, the role
@ -480,21 +152,15 @@ module Google
# @return [String]
attr_accessor :description
# Optional. A human-readable title for the role. Typically this
# is limited to 100 UTF-8 bytes.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@title = args[:title] if args.key?(:title)
@name = args[:name] if args.key?(:name)
@description = args[:description] if args.key?(:description)
@title = args[:title] if args.key?(:title)
end
end
@ -640,38 +306,6 @@ module Google
class ServiceAccount
include Google::Apis::Core::Hashable
# Optional. A user-specified description of the service account. Must be
# fewer than 100 UTF-8 bytes.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Used to perform a consistent read-modify-write.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# @OutputOnly The email address of the service account.
# Corresponds to the JSON property `email`
# @return [String]
attr_accessor :email
# The resource name of the service account in the following format:
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``.
# Requests using `-` as a wildcard for the project will infer the project
# from the `account` and the `account` value can be the `email` address or
# the `unique_id` of the service account.
# In responses the resource name will always be in the format
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# @OutputOnly The id of the project that owns the service account.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# @OutputOnly The unique and stable id of the service account.
# Corresponds to the JSON property `uniqueId`
# @return [String]
@ -684,19 +318,70 @@ module Google
# @return [String]
attr_accessor :oauth2_client_id
# Optional. A user-specified description of the service account. Must be
# fewer than 100 UTF-8 bytes.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Used to perform a consistent read-modify-write.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The resource name of the service account in the following format:
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``.
# Requests using `-` as a wildcard for the project will infer the project
# from the `account` and the `account` value can be the `email` address or
# the `unique_id` of the service account.
# In responses the resource name will always be in the format
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# @OutputOnly The email address of the service account.
# Corresponds to the JSON property `email`
# @return [String]
attr_accessor :email
# @OutputOnly The id of the project that owns the service account.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@etag = args[:etag] if args.key?(:etag)
@email = args[:email] if args.key?(:email)
@name = args[:name] if args.key?(:name)
@project_id = args[:project_id] if args.key?(:project_id)
@unique_id = args[:unique_id] if args.key?(:unique_id)
@oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id)
@display_name = args[:display_name] if args.key?(:display_name)
@etag = args[:etag] if args.key?(:etag)
@name = args[:name] if args.key?(:name)
@email = args[:email] if args.key?(:email)
@project_id = args[:project_id] if args.key?(:project_id)
end
end
# The service account keys list response.
class ListServiceAccountKeysResponse
include Google::Apis::Core::Hashable
# The public keys for the service account.
# Corresponds to the JSON property `keys`
# @return [Array<Google::Apis::IamV1::ServiceAccountKey>]
attr_accessor :keys
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@keys = args[:keys] if args.key?(:keys)
end
end
@ -720,14 +405,61 @@ module Google
end
end
# The service account keys list response.
class ListServiceAccountKeysResponse
# Represents a service account key.
# A service account has two sets of key-pairs: user-managed, and
# system-managed.
# User-managed key-pairs can be created and deleted by users. Users are
# responsible for rotating these keys periodically to ensure security of
# their service accounts. Users retain the private key of these key-pairs,
# and Google retains ONLY the public key.
# System-managed key-pairs are managed automatically by Google, and rotated
# daily without user intervention. The private key never leaves Google's
# servers to maximize security.
# Public keys for all service accounts are also published at the OAuth2
# Service Account API.
class ServiceAccountKey
include Google::Apis::Core::Hashable
# The public keys for the service account.
# Corresponds to the JSON property `keys`
# @return [Array<Google::Apis::IamV1::ServiceAccountKey>]
attr_accessor :keys
# The resource name of the service account key in the following format
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The key can be used before this timestamp.
# Corresponds to the JSON property `validBeforeTime`
# @return [String]
attr_accessor :valid_before_time
# Specifies the algorithm (and possibly key size) for the key.
# Corresponds to the JSON property `keyAlgorithm`
# @return [String]
attr_accessor :key_algorithm
# The key can be used after this timestamp.
# Corresponds to the JSON property `validAfterTime`
# @return [String]
attr_accessor :valid_after_time
# The output format for the private key.
# Only provided in `CreateServiceAccountKey` responses, not
# in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
# Google never exposes system-managed private keys, and never retains
# user-managed private keys.
# Corresponds to the JSON property `privateKeyType`
# @return [String]
attr_accessor :private_key_type
# The private key data. Only provided in `CreateServiceAccountKey`
# responses.
# Corresponds to the JSON property `privateKeyData`
# @return [String]
attr_accessor :private_key_data
# The public key data. Only provided in `GetServiceAccountKey` responses.
# Corresponds to the JSON property `publicKeyData`
# @return [String]
attr_accessor :public_key_data
def initialize(**args)
update!(**args)
@ -735,7 +467,275 @@ module Google
# Update properties of this object
def update!(**args)
@keys = args[:keys] if args.key?(:keys)
@name = args[:name] if args.key?(:name)
@valid_before_time = args[:valid_before_time] if args.key?(:valid_before_time)
@key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm)
@valid_after_time = args[:valid_after_time] if args.key?(:valid_after_time)
@private_key_type = args[:private_key_type] if args.key?(:private_key_type)
@private_key_data = args[:private_key_data] if args.key?(:private_key_data)
@public_key_data = args[:public_key_data] if args.key?(:public_key_data)
end
end
# The service account key create request.
class CreateServiceAccountKeyRequest
include Google::Apis::Core::Hashable
# Which type of key and algorithm to use for the key.
# The default is currently a 4K RSA key. However this may change in the
# future.
# Corresponds to the JSON property `keyAlgorithm`
# @return [String]
attr_accessor :key_algorithm
# The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the
# default output format.
# Corresponds to the JSON property `privateKeyType`
# @return [String]
attr_accessor :private_key_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm)
@private_key_type = args[:private_key_type] if args.key?(:private_key_type)
end
end
# Request message for `TestIamPermissions` method.
class TestIamPermissionsRequest
include Google::Apis::Core::Hashable
# The set of permissions to check for the `resource`. Permissions with
# wildcards (such as '*' or 'storage.*') are not allowed. For more
# information see
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# The service account sign blob response.
class SignBlobResponse
include Google::Apis::Core::Hashable
# The id of the key used to sign the blob.
# Corresponds to the JSON property `keyId`
# @return [String]
attr_accessor :key_id
# The signed blob.
# Corresponds to the JSON property `signature`
# @return [String]
attr_accessor :signature
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key_id = args[:key_id] if args.key?(:key_id)
@signature = args[:signature] if args.key?(:signature)
end
end
# The service account sign JWT response.
class SignJwtResponse
include Google::Apis::Core::Hashable
# The id of the key used to sign the JWT.
# Corresponds to the JSON property `keyId`
# @return [String]
attr_accessor :key_id
# The signed JWT.
# Corresponds to the JSON property `signedJwt`
# @return [String]
attr_accessor :signed_jwt
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key_id = args[:key_id] if args.key?(:key_id)
@signed_jwt = args[:signed_jwt] if args.key?(:signed_jwt)
end
end
# The service account sign JWT request.
class SignJwtRequest
include Google::Apis::Core::Hashable
# The JWT payload to sign, a JSON JWT Claim set.
# Corresponds to the JSON property `payload`
# @return [String]
attr_accessor :payload
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@payload = args[:payload] if args.key?(:payload)
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
# **Example**
# `
# "bindings": [
# `
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# `,
# `
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# `
# ]
# `
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
class Policy
include Google::Apis::Core::Hashable
# Version of the `Policy`. The default version is 0.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
# Associates a list of `members` to a `role`.
# Multiple `bindings` must not be specified for the same `role`.
# `bindings` with no members will result in an error.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::IamV1::Binding>]
attr_accessor :bindings
# `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the
# read-modify-write cycle to perform policy updates in order to avoid race
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten blindly.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@version = args[:version] if args.key?(:version)
@bindings = args[:bindings] if args.key?(:bindings)
@etag = args[:etag] if args.key?(:etag)
end
end
# Audit log information specific to Cloud IAM. This message is serialized
# as an `Any` type in the `ServiceData` message of an
# `AuditLog` message.
class AuditData
include Google::Apis::Core::Hashable
# The difference delta between two policies.
# Corresponds to the JSON property `policyDelta`
# @return [Google::Apis::IamV1::PolicyDelta]
attr_accessor :policy_delta
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@policy_delta = args[:policy_delta] if args.key?(:policy_delta)
end
end
# One delta entry for Binding. Each individual change (only one member in each
# entry) to a binding will be a separate entry.
class BindingDelta
include Google::Apis::Core::Hashable
# The action that was performed on a Binding.
# Required
# Corresponds to the JSON property `action`
# @return [String]
attr_accessor :action
# A single identity requesting access for a Cloud Platform resource.
# Follows the same format of Binding.members.
# Required
# Corresponds to the JSON property `member`
# @return [String]
attr_accessor :member
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@action = args[:action] if args.key?(:action)
@member = args[:member] if args.key?(:member)
@role = args[:role] if args.key?(:role)
end
end
# The difference delta between two policies.
class PolicyDelta
include Google::Apis::Core::Hashable
# The delta for Bindings between two policies.
# Corresponds to the JSON property `bindingDeltas`
# @return [Array<Google::Apis::IamV1::BindingDelta>]
attr_accessor :binding_deltas
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@binding_deltas = args[:binding_deltas] if args.key?(:binding_deltas)
end
end
end

View File

@ -22,61 +22,7 @@ module Google
module Apis
module IamV1
class ServiceAccountKey
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CreateServiceAccountKeyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SignJwtResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SignBlobResponse
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 Policy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SignJwtRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AuditData
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BindingDelta
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PolicyDelta
class CreateServiceAccountRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -88,12 +34,6 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class CreateServiceAccountRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class QueryGrantableRolesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -142,111 +82,76 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class TestIamPermissionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListServiceAccountKeysResponse
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 ServiceAccountKey
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :valid_after_time, as: 'validAfterTime'
property :private_key_type, as: 'privateKeyType'
property :private_key_data, :base64 => true, as: 'privateKeyData'
property :public_key_data, :base64 => true, as: 'publicKeyData'
property :name, as: 'name'
property :valid_before_time, as: 'validBeforeTime'
property :key_algorithm, as: 'keyAlgorithm'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CreateServiceAccountKeyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :private_key_type, as: 'privateKeyType'
property :key_algorithm, as: 'keyAlgorithm'
end
end
class Representation < Google::Apis::Core::JsonRepresentation; end
class SignJwtResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key_id, as: 'keyId'
property :signed_jwt, as: 'signedJwt'
end
end
class SignBlobResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :signature, :base64 => true, as: 'signature'
property :key_id, as: 'keyId'
end
include Google::Apis::Core::JsonObjectSupport
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
collection :bindings, as: 'bindings', class: Google::Apis::IamV1::Binding, decorator: Google::Apis::IamV1::Binding::Representation
class SignBlobResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
include Google::Apis::Core::JsonObjectSupport
end
class SignJwtResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SignJwtRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :payload, as: 'payload'
end
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 AuditData
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :policy_delta, as: 'policyDelta', class: Google::Apis::IamV1::PolicyDelta, decorator: Google::Apis::IamV1::PolicyDelta::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
include Google::Apis::Core::JsonObjectSupport
end
class BindingDelta
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :action, as: 'action'
property :member, as: 'member'
property :role, as: 'role'
end
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PolicyDelta
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :binding_deltas, as: 'bindingDeltas', class: Google::Apis::IamV1::BindingDelta, decorator: Google::Apis::IamV1::BindingDelta::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ListServiceAccountsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :accounts, as: 'accounts', class: Google::Apis::IamV1::ServiceAccount, decorator: Google::Apis::IamV1::ServiceAccount::Representation
end
include Google::Apis::Core::JsonObjectSupport
end
class CreateServiceAccountRequest
@ -258,6 +163,15 @@ module Google
end
end
class ListServiceAccountsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :accounts, as: 'accounts', class: Google::Apis::IamV1::ServiceAccount, decorator: Google::Apis::IamV1::ServiceAccount::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class QueryGrantableRolesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -276,9 +190,9 @@ module Google
class Role
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :title, as: 'title'
property :name, as: 'name'
property :description, as: 'description'
property :title, as: 'title'
end
end
@ -314,20 +228,13 @@ module Google
class ServiceAccount
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :etag, :base64 => true, as: 'etag'
property :email, as: 'email'
property :name, as: 'name'
property :project_id, as: 'projectId'
property :unique_id, as: 'uniqueId'
property :oauth2_client_id, as: 'oauth2ClientId'
end
end
class TestIamPermissionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
property :display_name, as: 'displayName'
property :etag, :base64 => true, as: 'etag'
property :name, as: 'name'
property :email, as: 'email'
property :project_id, as: 'projectId'
end
end
@ -338,6 +245,99 @@ module Google
end
end
class TestIamPermissionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class ServiceAccountKey
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :valid_before_time, as: 'validBeforeTime'
property :key_algorithm, as: 'keyAlgorithm'
property :valid_after_time, as: 'validAfterTime'
property :private_key_type, as: 'privateKeyType'
property :private_key_data, :base64 => true, as: 'privateKeyData'
property :public_key_data, :base64 => true, as: 'publicKeyData'
end
end
class CreateServiceAccountKeyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key_algorithm, as: 'keyAlgorithm'
property :private_key_type, as: 'privateKeyType'
end
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class SignBlobResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key_id, as: 'keyId'
property :signature, :base64 => true, as: 'signature'
end
end
class SignJwtResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key_id, as: 'keyId'
property :signed_jwt, as: 'signedJwt'
end
end
class SignJwtRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :payload, as: 'payload'
end
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :version, as: 'version'
collection :bindings, as: 'bindings', class: Google::Apis::IamV1::Binding, decorator: Google::Apis::IamV1::Binding::Representation
property :etag, :base64 => true, as: 'etag'
end
end
class AuditData
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :policy_delta, as: 'policyDelta', class: Google::Apis::IamV1::PolicyDelta, decorator: Google::Apis::IamV1::PolicyDelta::Representation
end
end
class BindingDelta
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :action, as: 'action'
property :member, as: 'member'
property :role, as: 'role'
end
end
class PolicyDelta
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :binding_deltas, as: 'bindingDeltas', class: Google::Apis::IamV1::BindingDelta, decorator: Google::Apis::IamV1::BindingDelta::Representation
end
end
end
end
end

View File

@ -48,38 +48,6 @@ module Google
super('https://iam.googleapis.com/', '')
end
# Queries roles that can be granted on a particular resource.
# A role is grantable if it can be used as the role in a binding for a policy
# for that resource.
# @param [Google::Apis::IamV1::QueryGrantableRolesRequest] query_grantable_roles_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::IamV1::QueryGrantableRolesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::IamV1::QueryGrantableRolesResponse]
#
# @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 query_grantable_roles(query_grantable_roles_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/roles:queryGrantableRoles', options)
command.request_representation = Google::Apis::IamV1::QueryGrantableRolesRequest::Representation
command.request_object = query_grantable_roles_request_object
command.response_representation = Google::Apis::IamV1::QueryGrantableRolesResponse::Representation
command.response_class = Google::Apis::IamV1::QueryGrantableRolesResponse
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 ServiceAccount
# and returns it.
# @param [String] name
@ -370,6 +338,43 @@ module Google
execute_or_queue_command(command, &block)
end
# Signs a blob using a service account's system-managed private key.
# @param [String] name
# The resource name of the service account in the following format:
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``.
# Using `-` as a wildcard for the project will infer the project from
# the account. The `account` value can be the `email` address or the
# `unique_id` of the service account.
# @param [Google::Apis::IamV1::SignBlobRequest] sign_blob_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::IamV1::SignBlobResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::IamV1::SignBlobResponse]
#
# @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 sign_service_account_blob(name, sign_blob_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:signBlob', options)
command.request_representation = Google::Apis::IamV1::SignBlobRequest::Representation
command.request_object = sign_blob_request_object
command.response_representation = Google::Apis::IamV1::SignBlobResponse::Representation
command.response_class = Google::Apis::IamV1::SignBlobResponse
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 ServiceAccounts for a project.
# @param [String] name
# Required. The resource name of the project associated with the service
@ -411,14 +416,15 @@ module Google
execute_or_queue_command(command, &block)
end
# Signs a blob using a service account's system-managed private key.
# Creates a ServiceAccountKey
# and returns it.
# @param [String] name
# The resource name of the service account in the following format:
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``.
# Using `-` as a wildcard for the project will infer the project from
# the account. The `account` value can be the `email` address or the
# `unique_id` of the service account.
# @param [Google::Apis::IamV1::SignBlobRequest] sign_blob_request_object
# @param [Google::Apis::IamV1::CreateServiceAccountKeyRequest] create_service_account_key_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -428,20 +434,20 @@ module Google
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::IamV1::SignBlobResponse] parsed result object
# @yieldparam result [Google::Apis::IamV1::ServiceAccountKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::IamV1::SignBlobResponse]
# @return [Google::Apis::IamV1::ServiceAccountKey]
#
# @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 sign_service_account_blob(name, sign_blob_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:signBlob', options)
command.request_representation = Google::Apis::IamV1::SignBlobRequest::Representation
command.request_object = sign_blob_request_object
command.response_representation = Google::Apis::IamV1::SignBlobResponse::Representation
command.response_class = Google::Apis::IamV1::SignBlobResponse
def create_service_account_key(name, create_service_account_key_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}/keys', options)
command.request_representation = Google::Apis::IamV1::CreateServiceAccountKeyRequest::Representation
command.request_object = create_service_account_key_request_object
command.response_representation = Google::Apis::IamV1::ServiceAccountKey::Representation
command.response_class = Google::Apis::IamV1::ServiceAccountKey
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
@ -560,15 +566,10 @@ module Google
execute_or_queue_command(command, &block)
end
# Creates a ServiceAccountKey
# and returns it.
# @param [String] name
# The resource name of the service account in the following format:
# `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``.
# Using `-` as a wildcard for the project will infer the project from
# the account. The `account` value can be the `email` address or the
# `unique_id` of the service account.
# @param [Google::Apis::IamV1::CreateServiceAccountKeyRequest] create_service_account_key_request_object
# Queries roles that can be granted on a particular resource.
# A role is grantable if it can be used as the role in a binding for a policy
# for that resource.
# @param [Google::Apis::IamV1::QueryGrantableRolesRequest] query_grantable_roles_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
@ -578,21 +579,20 @@ module Google
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::IamV1::ServiceAccountKey] parsed result object
# @yieldparam result [Google::Apis::IamV1::QueryGrantableRolesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::IamV1::ServiceAccountKey]
# @return [Google::Apis::IamV1::QueryGrantableRolesResponse]
#
# @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_service_account_key(name, create_service_account_key_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}/keys', options)
command.request_representation = Google::Apis::IamV1::CreateServiceAccountKeyRequest::Representation
command.request_object = create_service_account_key_request_object
command.response_representation = Google::Apis::IamV1::ServiceAccountKey::Representation
command.response_class = Google::Apis::IamV1::ServiceAccountKey
command.params['name'] = name unless name.nil?
def query_grantable_roles(query_grantable_roles_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/roles:queryGrantableRoles', options)
command.request_representation = Google::Apis::IamV1::QueryGrantableRolesRequest::Representation
command.request_object = query_grantable_roles_request_object
command.response_representation = Google::Apis::IamV1::QueryGrantableRolesResponse::Representation
command.response_class = Google::Apis::IamV1::QueryGrantableRolesResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/identity-toolkit/v3/
module IdentitytoolkitV3
VERSION = 'V3'
REVISION = '20161206'
REVISION = '20170203'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -105,7 +105,7 @@ module Google
end
end
# Respone of downloading accounts in batch.
# Response of downloading accounts in batch.
class DownloadAccountResponse
include Google::Apis::Core::Hashable
@ -950,6 +950,11 @@ module Google
# @return [String]
attr_accessor :instance_id
# Privileged caller can create user with specified user id.
# Corresponds to the JSON property `localId`
# @return [String]
attr_accessor :local_id
# The new password of the user.
# Corresponds to the JSON property `password`
# @return [String]
@ -974,6 +979,7 @@ module Google
@email_verified = args[:email_verified] if args.key?(:email_verified)
@id_token = args[:id_token] if args.key?(:id_token)
@instance_id = args[:instance_id] if args.key?(:instance_id)
@local_id = args[:local_id] if args.key?(:local_id)
@password = args[:password] if args.key?(:password)
@photo_url = args[:photo_url] if args.key?(:photo_url)
end
@ -1408,6 +1414,12 @@ module Google
# @return [String]
attr_accessor :email
# If email has been verified.
# Corresponds to the JSON property `emailVerified`
# @return [Boolean]
attr_accessor :email_verified
alias_method :email_verified?, :email_verified
# If idToken is STS id token, then this field will be expiration time of STS id
# token in seconds.
# Corresponds to the JSON property `expiresIn`
@ -1462,6 +1474,7 @@ module Google
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@email = args[:email] if args.key?(:email)
@email_verified = args[:email_verified] if args.key?(:email_verified)
@expires_in = args[:expires_in] if args.key?(:expires_in)
@id_token = args[:id_token] if args.key?(:id_token)
@kind = args[:kind] if args.key?(:kind)
@ -1885,6 +1898,12 @@ module Google
# @return [String]
attr_accessor :input_email
# True if it's a new user sign-in, false if it's a returning user.
# Corresponds to the JSON property `isNewUser`
# @return [Boolean]
attr_accessor :is_new_user
alias_method :is_new_user?, :is_new_user
# The fixed string "identitytoolkit#VerifyAssertionResponse".
# Corresponds to the JSON property `kind`
# @return [String]
@ -2026,6 +2045,7 @@ module Google
@full_name = args[:full_name] if args.key?(:full_name)
@id_token = args[:id_token] if args.key?(:id_token)
@input_email = args[:input_email] if args.key?(:input_email)
@is_new_user = args[:is_new_user] if args.key?(:is_new_user)
@kind = args[:kind] if args.key?(:kind)
@language = args[:language] if args.key?(:language)
@last_name = args[:last_name] if args.key?(:last_name)

View File

@ -472,6 +472,7 @@ module Google
property :email_verified, as: 'emailVerified'
property :id_token, as: 'idToken'
property :instance_id, as: 'instanceId'
property :local_id, as: 'localId'
property :password, as: 'password'
property :photo_url, as: 'photoUrl'
end
@ -576,6 +577,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :email, as: 'email'
property :email_verified, as: 'emailVerified'
property :expires_in, as: 'expiresIn'
property :id_token, as: 'idToken'
property :kind, as: 'kind'
@ -685,6 +687,7 @@ module Google
property :full_name, as: 'fullName'
property :id_token, as: 'idToken'
property :input_email, as: 'inputEmail'
property :is_new_user, as: 'isNewUser'
property :kind, as: 'kind'
property :language, as: 'language'
property :last_name, as: 'lastName'

View File

@ -27,11 +27,6 @@ module Google
class SearchResponse
include Google::Apis::Core::Hashable
# The schema type of top-level JSON-LD object, e.g. ItemList.
# Corresponds to the JSON property `@type`
# @return [Object]
attr_accessor :_type
# The local context applicable for the response. See more details at
# http://www.w3.org/TR/json-ld/#context-definitions.
# Corresponds to the JSON property `@context`
@ -43,15 +38,20 @@ module Google
# @return [Array<Object>]
attr_accessor :item_list_element
# The schema type of top-level JSON-LD object, e.g. ItemList.
# Corresponds to the JSON property `@type`
# @return [Object]
attr_accessor :_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@_type = args[:_type] if args.key?(:_type)
@_context = args[:_context] if args.key?(:_context)
@item_list_element = args[:item_list_element] if args.key?(:item_list_element)
@_type = args[:_type] if args.key?(:_type)
end
end
end

View File

@ -31,9 +31,9 @@ module Google
class SearchResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :_type, as: '@type'
property :_context, as: '@context'
collection :item_list_element, as: 'itemListElement'
property :_type, as: '@type'
end
end
end

View File

@ -32,16 +32,16 @@ module Google
#
# @see https://developers.google.com/knowledge-graph/
class KgsearchService < 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
# @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
def initialize
super('https://kgsearch.googleapis.com/', '')
end
@ -49,14 +49,6 @@ module Google
# Searches Knowledge Graph for entities that match the constraints.
# A list of matched entities will be returned in response, which will be in
# JSON-LD format and compatible with http://schema.org
# @param [Boolean] prefix
# Enables prefix match against names and aliases of entities
# @param [String] query
# The literal query string for search.
# @param [Array<String>, String] types
# Restricts returned entities with these types, e.g. Person
# (as defined in http://schema.org/Person). If multiple types are specified,
# returned entities will contain one or more of these types.
# @param [Boolean] indent
# Enables indenting of json results.
# @param [Array<String>, String] languages
@ -68,11 +60,19 @@ module Google
# URL as in ...?ids=A&ids=B
# @param [Fixnum] limit
# Limits the number of entities to be returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Boolean] prefix
# Enables prefix match against names and aliases of entities
# @param [String] query
# The literal query string for search.
# @param [Array<String>, String] types
# Restricts returned entities with these types, e.g. Person
# (as defined in http://schema.org/Person). If multiple types are specified,
# returned entities will contain one or more of these types.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -85,27 +85,27 @@ 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 search_entities(prefix: nil, query: nil, types: nil, indent: nil, languages: nil, ids: nil, limit: nil, fields: nil, quota_user: nil, options: nil, &block)
def search_entities(indent: nil, languages: nil, ids: nil, limit: nil, prefix: nil, query: nil, types: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/entities:search', options)
command.response_representation = Google::Apis::KgsearchV1::SearchResponse::Representation
command.response_class = Google::Apis::KgsearchV1::SearchResponse
command.query['prefix'] = prefix unless prefix.nil?
command.query['query'] = query unless query.nil?
command.query['types'] = types unless types.nil?
command.query['indent'] = indent unless indent.nil?
command.query['languages'] = languages unless languages.nil?
command.query['ids'] = ids unless ids.nil?
command.query['limit'] = limit unless limit.nil?
command.query['fields'] = fields unless fields.nil?
command.query['prefix'] = prefix unless prefix.nil?
command.query['query'] = query unless query.nil?
command.query['types'] = types unless types.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.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?
command.query['key'] = key unless key.nil?
end
end
end

View File

@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/natural-language/
module LanguageV1beta1
VERSION = 'V1beta1'
REVISION = '20170123'
REVISION = '20170206'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -22,10 +22,127 @@ module Google
module Apis
module LanguageV1beta1
# Represents part of speech information for a token.
class PartOfSpeech
include Google::Apis::Core::Hashable
# The grammatical reciprocity.
# Corresponds to the JSON property `reciprocity`
# @return [String]
attr_accessor :reciprocity
# The grammatical form.
# Corresponds to the JSON property `form`
# @return [String]
attr_accessor :form
# The grammatical number.
# Corresponds to the JSON property `number`
# @return [String]
attr_accessor :number
# The grammatical voice.
# Corresponds to the JSON property `voice`
# @return [String]
attr_accessor :voice
# The grammatical aspect.
# Corresponds to the JSON property `aspect`
# @return [String]
attr_accessor :aspect
# The grammatical mood.
# Corresponds to the JSON property `mood`
# @return [String]
attr_accessor :mood
# The part of speech tag.
# Corresponds to the JSON property `tag`
# @return [String]
attr_accessor :tag
# The grammatical gender.
# Corresponds to the JSON property `gender`
# @return [String]
attr_accessor :gender
# The grammatical person.
# Corresponds to the JSON property `person`
# @return [String]
attr_accessor :person
# The grammatical properness.
# Corresponds to the JSON property `proper`
# @return [String]
attr_accessor :proper
# The grammatical case.
# Corresponds to the JSON property `case`
# @return [String]
attr_accessor :case
# The grammatical tense.
# Corresponds to the JSON property `tense`
# @return [String]
attr_accessor :tense
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@reciprocity = args[:reciprocity] if args.key?(:reciprocity)
@form = args[:form] if args.key?(:form)
@number = args[:number] if args.key?(:number)
@voice = args[:voice] if args.key?(:voice)
@aspect = args[:aspect] if args.key?(:aspect)
@mood = args[:mood] if args.key?(:mood)
@tag = args[:tag] if args.key?(:tag)
@gender = args[:gender] if args.key?(:gender)
@person = args[:person] if args.key?(:person)
@proper = args[:proper] if args.key?(:proper)
@case = args[:case] if args.key?(:case)
@tense = args[:tense] if args.key?(:tense)
end
end
# The syntax analysis request message.
class AnalyzeSyntaxRequest
include Google::Apis::Core::Hashable
# The encoding type used by the API to calculate offsets.
# Corresponds to the JSON property `encodingType`
# @return [String]
attr_accessor :encoding_type
# ################################################################ #
# Represents the input to API methods.
# Corresponds to the JSON property `document`
# @return [Google::Apis::LanguageV1beta1::Document]
attr_accessor :document
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@encoding_type = args[:encoding_type] if args.key?(:encoding_type)
@document = args[:document] if args.key?(:document)
end
end
# The sentiment analysis response message.
class AnalyzeSentimentResponse
include Google::Apis::Core::Hashable
# Represents the feeling associated with the entire text or entities in
# the text.
# Corresponds to the JSON property `documentSentiment`
# @return [Google::Apis::LanguageV1beta1::Sentiment]
attr_accessor :document_sentiment
# The language of the text, which will be the same as the language specified
# in the request or, if not specified, the automatically-detected language.
# Corresponds to the JSON property `language`
@ -37,21 +154,15 @@ module Google
# @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
attr_accessor :sentences
# Represents the feeling associated with the entire text or entities in
# the text.
# Corresponds to the JSON property `documentSentiment`
# @return [Google::Apis::LanguageV1beta1::Sentiment]
attr_accessor :document_sentiment
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
@language = args[:language] if args.key?(:language)
@sentences = args[:sentences] if args.key?(:sentences)
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
end
end
@ -82,39 +193,6 @@ module Google
end
end
# The syntax analysis response message.
class AnalyzeSyntaxResponse
include Google::Apis::Core::Hashable
# The language of the text, which will be the same as the language specified
# in the request or, if not specified, the automatically-detected language.
# See Document.language field for more details.
# Corresponds to the JSON property `language`
# @return [String]
attr_accessor :language
# Sentences in the input document.
# Corresponds to the JSON property `sentences`
# @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
attr_accessor :sentences
# Tokens, along with their syntactic information, in the input document.
# Corresponds to the JSON property `tokens`
# @return [Array<Google::Apis::LanguageV1beta1::Token>]
attr_accessor :tokens
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@language = args[:language] if args.key?(:language)
@sentences = args[:sentences] if args.key?(:sentences)
@tokens = args[:tokens] if args.key?(:tokens)
end
end
# Represents a phrase in the text that is a known entity, such as
# a person, an organization, or location. The API associates information, such
# as salience and mentions, with entities.
@ -167,6 +245,39 @@ module Google
end
end
# The syntax analysis response message.
class AnalyzeSyntaxResponse
include Google::Apis::Core::Hashable
# Tokens, along with their syntactic information, in the input document.
# Corresponds to the JSON property `tokens`
# @return [Array<Google::Apis::LanguageV1beta1::Token>]
attr_accessor :tokens
# The language of the text, which will be the same as the language specified
# in the request or, if not specified, the automatically-detected language.
# See Document.language field for more details.
# Corresponds to the JSON property `language`
# @return [String]
attr_accessor :language
# Sentences in the input document.
# Corresponds to the JSON property `sentences`
# @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
attr_accessor :sentences
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@tokens = args[:tokens] if args.key?(:tokens)
@language = args[:language] if args.key?(:language)
@sentences = args[:sentences] if args.key?(:sentences)
end
end
# The request message for the text annotation API, which can perform multiple
# analysis types (sentiment, entities, and syntax) in one call.
class AnnotateTextRequest
@ -205,6 +316,12 @@ module Google
class AnnotateTextResponse
include Google::Apis::Core::Hashable
# Represents the feeling associated with the entire text or entities in
# the text.
# Corresponds to the JSON property `documentSentiment`
# @return [Google::Apis::LanguageV1beta1::Sentiment]
attr_accessor :document_sentiment
# The language of the text, which will be the same as the language specified
# in the request or, if not specified, the automatically-detected language.
# See Document.language field for more details.
@ -232,23 +349,17 @@ module Google
# @return [Array<Google::Apis::LanguageV1beta1::Entity>]
attr_accessor :entities
# Represents the feeling associated with the entire text or entities in
# the text.
# Corresponds to the JSON property `documentSentiment`
# @return [Google::Apis::LanguageV1beta1::Sentiment]
attr_accessor :document_sentiment
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
@language = args[:language] if args.key?(:language)
@sentences = args[:sentences] if args.key?(:sentences)
@tokens = args[:tokens] if args.key?(:tokens)
@entities = args[:entities] if args.key?(:entities)
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
end
end
@ -283,6 +394,11 @@ module Google
class DependencyEdge
include Google::Apis::Core::Hashable
# The parse label for the token.
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
# Represents the head of this token in the dependency tree.
# This is the index of the token which has an arc going to this token.
# The index is the position of the token in the array of tokens returned
@ -292,10 +408,40 @@ module Google
# @return [Fixnum]
attr_accessor :head_token_index
# The parse label for the token.
# Corresponds to the JSON property `label`
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@label = args[:label] if args.key?(:label)
@head_token_index = args[:head_token_index] if args.key?(:head_token_index)
end
end
# Represents the smallest syntactic building block of the text.
class Token
include Google::Apis::Core::Hashable
# Represents part of speech information for a token.
# Corresponds to the JSON property `partOfSpeech`
# @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
attr_accessor :part_of_speech
# Represents an output piece of text.
# Corresponds to the JSON property `text`
# @return [Google::Apis::LanguageV1beta1::TextSpan]
attr_accessor :text
# Represents dependency parse tree information for a token.
# Corresponds to the JSON property `dependencyEdge`
# @return [Google::Apis::LanguageV1beta1::DependencyEdge]
attr_accessor :dependency_edge
# [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
# Corresponds to the JSON property `lemma`
# @return [String]
attr_accessor :label
attr_accessor :lemma
def initialize(**args)
update!(**args)
@ -303,8 +449,10 @@ module Google
# Update properties of this object
def update!(**args)
@head_token_index = args[:head_token_index] if args.key?(:head_token_index)
@label = args[:label] if args.key?(:label)
@part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
@text = args[:text] if args.key?(:text)
@dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
@lemma = args[:lemma] if args.key?(:lemma)
end
end
@ -334,43 +482,6 @@ module Google
end
end
# Represents the smallest syntactic building block of the text.
class Token
include Google::Apis::Core::Hashable
# [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
# Corresponds to the JSON property `lemma`
# @return [String]
attr_accessor :lemma
# Represents part of speech information for a token.
# Corresponds to the JSON property `partOfSpeech`
# @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
attr_accessor :part_of_speech
# Represents an output piece of text.
# Corresponds to the JSON property `text`
# @return [Google::Apis::LanguageV1beta1::TextSpan]
attr_accessor :text
# Represents dependency parse tree information for a token.
# Corresponds to the JSON property `dependencyEdge`
# @return [Google::Apis::LanguageV1beta1::DependencyEdge]
attr_accessor :dependency_edge
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@lemma = args[:lemma] if args.key?(:lemma)
@part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
@text = args[:text] if args.key?(:text)
@dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
end
end
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by
# [gRPC](https://github.com/grpc). The error model is designed to be:
@ -443,32 +554,6 @@ module Google
end
end
# Represents a mention for an entity in the text. Currently, proper noun
# mentions are supported.
class EntityMention
include Google::Apis::Core::Hashable
# Represents an output piece of text.
# Corresponds to the JSON property `text`
# @return [Google::Apis::LanguageV1beta1::TextSpan]
attr_accessor :text
# The type of the entity mention.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@text = args[:text] if args.key?(:text)
@type = args[:type] if args.key?(:type)
end
end
# All available features for sentiment, syntax, and semantic analysis.
# Setting each one to true will enable that specific analysis for the input.
class Features
@ -504,19 +589,37 @@ module Google
end
end
# Represents a mention for an entity in the text. Currently, proper noun
# mentions are supported.
class EntityMention
include Google::Apis::Core::Hashable
# Represents an output piece of text.
# Corresponds to the JSON property `text`
# @return [Google::Apis::LanguageV1beta1::TextSpan]
attr_accessor :text
# The type of the entity mention.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@text = args[:text] if args.key?(:text)
@type = args[:type] if args.key?(:type)
end
end
# ################################################################ #
# Represents the input to API methods.
class Document
include Google::Apis::Core::Hashable
# The Google Cloud Storage URI where the file content is located.
# This URI must be of the form: gs://bucket_name/object_name. For more
# details, see https://cloud.google.com/storage/docs/reference-uris.
# NOTE: Cloud Storage object versioning is not supported.
# Corresponds to the JSON property `gcsContentUri`
# @return [String]
attr_accessor :gcs_content_uri
# The language of the document (if not specified, the language is
# automatically detected). Both ISO and BCP-47 language codes are
# accepted.<br>
@ -540,16 +643,24 @@ module Google
# @return [String]
attr_accessor :content
# The Google Cloud Storage URI where the file content is located.
# This URI must be of the form: gs://bucket_name/object_name. For more
# details, see https://cloud.google.com/storage/docs/reference-uris.
# NOTE: Cloud Storage object versioning is not supported.
# Corresponds to the JSON property `gcsContentUri`
# @return [String]
attr_accessor :gcs_content_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
@language = args[:language] if args.key?(:language)
@type = args[:type] if args.key?(:type)
@content = args[:content] if args.key?(:content)
@gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
end
end
@ -579,32 +690,6 @@ module Google
end
end
# The entity analysis request message.
class AnalyzeEntitiesRequest
include Google::Apis::Core::Hashable
# The encoding type used by the API to calculate offsets.
# Corresponds to the JSON property `encodingType`
# @return [String]
attr_accessor :encoding_type
# ################################################################ #
# Represents the input to API methods.
# Corresponds to the JSON property `document`
# @return [Google::Apis::LanguageV1beta1::Document]
attr_accessor :document
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@encoding_type = args[:encoding_type] if args.key?(:encoding_type)
@document = args[:document] if args.key?(:document)
end
end
# Represents the feeling associated with the entire text or entities in
# the text.
class Sentiment
@ -642,93 +727,8 @@ module Google
end
end
# Represents part of speech information for a token.
class PartOfSpeech
include Google::Apis::Core::Hashable
# The grammatical case.
# Corresponds to the JSON property `case`
# @return [String]
attr_accessor :case
# The grammatical tense.
# Corresponds to the JSON property `tense`
# @return [String]
attr_accessor :tense
# The grammatical reciprocity.
# Corresponds to the JSON property `reciprocity`
# @return [String]
attr_accessor :reciprocity
# The grammatical form.
# Corresponds to the JSON property `form`
# @return [String]
attr_accessor :form
# The grammatical number.
# Corresponds to the JSON property `number`
# @return [String]
attr_accessor :number
# The grammatical voice.
# Corresponds to the JSON property `voice`
# @return [String]
attr_accessor :voice
# The grammatical aspect.
# Corresponds to the JSON property `aspect`
# @return [String]
attr_accessor :aspect
# The grammatical mood.
# Corresponds to the JSON property `mood`
# @return [String]
attr_accessor :mood
# The part of speech tag.
# Corresponds to the JSON property `tag`
# @return [String]
attr_accessor :tag
# The grammatical gender.
# Corresponds to the JSON property `gender`
# @return [String]
attr_accessor :gender
# The grammatical person.
# Corresponds to the JSON property `person`
# @return [String]
attr_accessor :person
# The grammatical properness.
# Corresponds to the JSON property `proper`
# @return [String]
attr_accessor :proper
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@case = args[:case] if args.key?(:case)
@tense = args[:tense] if args.key?(:tense)
@reciprocity = args[:reciprocity] if args.key?(:reciprocity)
@form = args[:form] if args.key?(:form)
@number = args[:number] if args.key?(:number)
@voice = args[:voice] if args.key?(:voice)
@aspect = args[:aspect] if args.key?(:aspect)
@mood = args[:mood] if args.key?(:mood)
@tag = args[:tag] if args.key?(:tag)
@gender = args[:gender] if args.key?(:gender)
@person = args[:person] if args.key?(:person)
@proper = args[:proper] if args.key?(:proper)
end
end
# The syntax analysis request message.
class AnalyzeSyntaxRequest
# The entity analysis request message.
class AnalyzeEntitiesRequest
include Google::Apis::Core::Hashable
# The encoding type used by the API to calculate offsets.

View File

@ -22,6 +22,18 @@ module Google
module Apis
module LanguageV1beta1
class PartOfSpeech
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AnalyzeSyntaxRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AnalyzeSentimentResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -34,13 +46,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AnalyzeSyntaxResponse
class Entity
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Entity
class AnalyzeSyntaxResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -70,13 +82,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class TextSpan
class Token
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Token
class TextSpan
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -88,13 +100,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class EntityMention
class Features
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Features
class EntityMention
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -112,38 +124,53 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AnalyzeEntitiesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Sentiment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PartOfSpeech
class AnalyzeEntitiesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AnalyzeSyntaxRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
class PartOfSpeech
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :reciprocity, as: 'reciprocity'
property :form, as: 'form'
property :number, as: 'number'
property :voice, as: 'voice'
property :aspect, as: 'aspect'
property :mood, as: 'mood'
property :tag, as: 'tag'
property :gender, as: 'gender'
property :person, as: 'person'
property :proper, as: 'proper'
property :case, as: 'case'
property :tense, as: 'tense'
end
end
include Google::Apis::Core::JsonObjectSupport
class AnalyzeSyntaxRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :encoding_type, as: 'encodingType'
property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
end
end
class AnalyzeSentimentResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
property :language, as: 'language'
collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
end
end
@ -156,17 +183,6 @@ module Google
end
end
class AnalyzeSyntaxResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :language, as: 'language'
collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation
end
end
class Entity
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -179,6 +195,17 @@ module Google
end
end
class AnalyzeSyntaxResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation
property :language, as: 'language'
collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
end
end
class AnnotateTextRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -193,6 +220,8 @@ module Google
class AnnotateTextResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
property :language, as: 'language'
collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
@ -200,8 +229,6 @@ module Google
collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
end
end
@ -217,8 +244,21 @@ module Google
class DependencyEdge
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :head_token_index, as: 'headTokenIndex'
property :label, as: 'label'
property :head_token_index, as: 'headTokenIndex'
end
end
class Token
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation
property :lemma, as: 'lemma'
end
end
@ -230,19 +270,6 @@ module Google
end
end
class Token
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :lemma, as: 'lemma'
property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation
end
end
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -252,15 +279,6 @@ module Google
end
end
class EntityMention
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
property :type, as: 'type'
end
end
class Features
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -270,13 +288,22 @@ module Google
end
end
class EntityMention
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
property :type, as: 'type'
end
end
class Document
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :gcs_content_uri, as: 'gcsContentUri'
property :language, as: 'language'
property :type, as: 'type'
property :content, as: 'content'
property :gcs_content_uri, as: 'gcsContentUri'
end
end
@ -290,15 +317,6 @@ module Google
end
end
class AnalyzeEntitiesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :encoding_type, as: 'encodingType'
property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
end
end
class Sentiment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -308,25 +326,7 @@ module Google
end
end
class PartOfSpeech
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :case, as: 'case'
property :tense, as: 'tense'
property :reciprocity, as: 'reciprocity'
property :form, as: 'form'
property :number, as: 'number'
property :voice, as: 'voice'
property :aspect, as: 'aspect'
property :mood, as: 'mood'
property :tag, as: 'tag'
property :gender, as: 'gender'
property :person, as: 'person'
property :proper, as: 'proper'
end
end
class AnalyzeSyntaxRequest
class AnalyzeEntitiesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :encoding_type, as: 'encodingType'

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/logging/docs/
module LoggingV2beta1
VERSION = 'V2beta1'
REVISION = '20170130'
REVISION = '20170210'
# View your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'

View File

@ -26,11 +26,6 @@ module Google
class ListMonitoredResourceDescriptorsResponse
include Google::Apis::Core::Hashable
# A list of resource descriptors.
# Corresponds to the JSON property `resourceDescriptors`
# @return [Array<Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor>]
attr_accessor :resource_descriptors
# If there might be more results than those appearing in this response, then
# nextPageToken is included. To get the next set of results, call this method
# again using the value of nextPageToken as pageToken.
@ -38,14 +33,19 @@ module Google
# @return [String]
attr_accessor :next_page_token
# A list of resource descriptors.
# Corresponds to the JSON property `resourceDescriptors`
# @return [Array<Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor>]
attr_accessor :resource_descriptors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
end
end
@ -54,26 +54,26 @@ module Google
class SourceReference
include Google::Apis::Core::Hashable
# The canonical and persistent identifier of the deployed revision. Example (git)
# : "0035781c50ec7aa23385dc841529ce8a4b70db1b"
# Corresponds to the JSON property `revisionId`
# @return [String]
attr_accessor :revision_id
# Optional. A URI string identifying the repository. Example: "https://github.
# com/GoogleCloudPlatform/kubernetes.git"
# Corresponds to the JSON property `repository`
# @return [String]
attr_accessor :repository
# The canonical and persistent identifier of the deployed revision. Example (git)
# : "0035781c50ec7aa23385dc841529ce8a4b70db1b"
# Corresponds to the JSON property `revisionId`
# @return [String]
attr_accessor :revision_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@revision_id = args[:revision_id] if args.key?(:revision_id)
@repository = args[:repository] if args.key?(:repository)
@revision_id = args[:revision_id] if args.key?(:revision_id)
end
end
@ -223,10 +223,85 @@ module Google
end
end
# The parameters to WriteLogEntries.
class WriteLogEntriesRequest
include Google::Apis::Core::Hashable
# Optional. Default labels that are added to the labels field of all log entries
# in entries. If a log entry already has a label with the same key as a label in
# this parameter, then the log entry's label is not changed. See LogEntry.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# An object representing a resource that can be used for monitoring, logging,
# billing, or other purposes. Examples include virtual machine instances,
# databases, and storage devices such as disks. The type field identifies a
# MonitoredResourceDescriptor object that describes the resource's schema.
# Information in the labels field identifies the actual resource and its
# attributes according to the schema. For example, a particular Compute Engine
# VM instance could be represented by the following object, because the
# MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
# zone":
# ` "type": "gce_instance",
# "labels": ` "instance_id": "12345678901234",
# "zone": "us-central1-a" ``
# Corresponds to the JSON property `resource`
# @return [Google::Apis::LoggingV2beta1::MonitoredResource]
attr_accessor :resource
# Optional. A default log resource name that is assigned to all log entries in
# entries that do not specify a value for log_name:
# "projects/[PROJECT_ID]/logs/[LOG_ID]"
# "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
# "folders/[FOLDER_ID]/logs/[LOG_ID]"
# [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
# or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
# 2Factivity". For more information about log names, see LogEntry.
# Corresponds to the JSON property `logName`
# @return [String]
attr_accessor :log_name
# Required. The log entries to write. Values supplied for the fields log_name,
# resource, and labels in this entries.write request are added to those log
# entries that do not provide their own values for the fields.To improve
# throughput and to avoid exceeding the quota limit for calls to entries.write,
# you should write multiple log entries at once rather than calling this method
# for each individual log entry.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
attr_accessor :entries
# Optional. Whether valid entries should be written even if some other entries
# fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not
# written, the response status will be the error associated with one of the
# failed entries and include error details in the form of
# WriteLogEntriesPartialErrors.
# Corresponds to the JSON property `partialSuccess`
# @return [Boolean]
attr_accessor :partial_success
alias_method :partial_success?, :partial_success
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@labels = args[:labels] if args.key?(:labels)
@resource = args[:resource] if args.key?(:resource)
@log_name = args[:log_name] if args.key?(:log_name)
@entries = args[:entries] if args.key?(:entries)
@partial_success = args[:partial_success] if args.key?(:partial_success)
end
end
# Describes a sink used to export log entries to one of the following
# destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
# Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
# The sink must be created within a project or organization.
# The sink must be created within a project, organization, billing account, or
# folder.
class LogSink
include Google::Apis::Core::Hashable
@ -238,6 +313,15 @@ module Google
# @return [String]
attr_accessor :name
# Optional. An advanced logs filter. The only exported log entries are those
# that are in the resource owning the sink and that match the filter. The filter
# must use the log entry format specified by the output_version_format parameter.
# For example, in the v2 format:
# logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
# Corresponds to the JSON property `filter`
# @return [String]
attr_accessor :filter
# Required. The export destination:
# "storage.googleapis.com/[GCS_BUCKET]"
# "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
@ -249,15 +333,6 @@ module Google
# @return [String]
attr_accessor :destination
# Optional. An advanced logs filter. The only exported log entries are those
# that are in the resource owning the sink and that match the filter. The filter
# must use the log entry format specified by the output_version_format parameter.
# For example, in the v2 format:
# logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
# Corresponds to the JSON property `filter`
# @return [String]
attr_accessor :filter
# Optional. The time at which this sink will stop exporting log entries. Log
# entries are exported only if their timestamp is earlier than the end time. If
# this field is not supplied, there is no end time. If both a start time and an
@ -300,8 +375,8 @@ module Google
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@destination = args[:destination] if args.key?(:destination)
@filter = args[:filter] if args.key?(:filter)
@destination = args[:destination] if args.key?(:destination)
@end_time = args[:end_time] if args.key?(:end_time)
@start_time = args[:start_time] if args.key?(:start_time)
@writer_identity = args[:writer_identity] if args.key?(:writer_identity)
@ -309,82 +384,16 @@ module Google
end
end
# The parameters to WriteLogEntries.
class WriteLogEntriesRequest
include Google::Apis::Core::Hashable
# Optional. Default labels that are added to the labels field of all log entries
# in entries. If a log entry already has a label with the same key as a label in
# this parameter, then the log entry's label is not changed. See LogEntry.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# An object representing a resource that can be used for monitoring, logging,
# billing, or other purposes. Examples include virtual machine instances,
# databases, and storage devices such as disks. The type field identifies a
# MonitoredResourceDescriptor object that describes the resource's schema.
# Information in the labels field identifies the actual resource and its
# attributes according to the schema. For example, a particular Compute Engine
# VM instance could be represented by the following object, because the
# MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
# zone":
# ` "type": "gce_instance",
# "labels": ` "instance_id": "12345678901234",
# "zone": "us-central1-a" ``
# Corresponds to the JSON property `resource`
# @return [Google::Apis::LoggingV2beta1::MonitoredResource]
attr_accessor :resource
# Optional. A default log resource name that is assigned to all log entries in
# entries that do not specify a value for log_name:
# "projects/[PROJECT_ID]/logs/[LOG_ID]"
# "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
# [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
# or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
# 2Factivity". For more information about log names, see LogEntry.
# Corresponds to the JSON property `logName`
# @return [String]
attr_accessor :log_name
# Required. The log entries to write. Values supplied for the fields log_name,
# resource, and labels in this entries.write request are added to those log
# entries that do not provide their own values for the fields.To improve
# throughput and to avoid exceeding the quota limit for calls to entries.write,
# you should write multiple log entries at once rather than calling this method
# for each individual log entry.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
attr_accessor :entries
# Optional. Whether valid entries should be written even if some other entries
# fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not
# written, the response status will be the error associated with one of the
# failed entries and include error details in the form of
# WriteLogEntriesPartialErrors.
# Corresponds to the JSON property `partialSuccess`
# @return [Boolean]
attr_accessor :partial_success
alias_method :partial_success?, :partial_success
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@labels = args[:labels] if args.key?(:labels)
@resource = args[:resource] if args.key?(:resource)
@log_name = args[:log_name] if args.key?(:log_name)
@entries = args[:entries] if args.key?(:entries)
@partial_success = args[:partial_success] if args.key?(:partial_success)
end
end
# Result returned from ListLogs.
class ListLogsResponse
include Google::Apis::Core::Hashable
# A list of log names. For example, "projects/my-project/syslog" or "
# organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
# Corresponds to the JSON property `logNames`
# @return [Array<String>]
attr_accessor :log_names
# If there might be more results than those appearing in this response, then
# nextPageToken is included. To get the next set of results, call this method
# again using the value of nextPageToken as pageToken.
@ -392,20 +401,14 @@ module Google
# @return [String]
attr_accessor :next_page_token
# A list of log names. For example, "projects/my-project/syslog" or "
# organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
# Corresponds to the JSON property `logNames`
# @return [Array<String>]
attr_accessor :log_names
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@log_names = args[:log_names] if args.key?(:log_names)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
@ -415,6 +418,47 @@ module Google
class HttpRequest
include Google::Apis::Core::Hashable
# The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
# Windows 98; Q312461; .NET CLR 1.0.3705)".
# Corresponds to the JSON property `userAgent`
# @return [String]
attr_accessor :user_agent
# The request processing latency on the server, from the time the request was
# received until the response was sent.
# Corresponds to the JSON property `latency`
# @return [String]
attr_accessor :latency
# The number of HTTP response bytes inserted into cache. Set only when a cache
# fill was attempted.
# Corresponds to the JSON property `cacheFillBytes`
# @return [String]
attr_accessor :cache_fill_bytes
# The request method. Examples: "GET", "HEAD", "PUT", "POST".
# Corresponds to the JSON property `requestMethod`
# @return [String]
attr_accessor :request_method
# The size of the HTTP response message sent back to the client, in bytes,
# including the response headers and the response body.
# Corresponds to the JSON property `responseSize`
# @return [String]
attr_accessor :response_size
# The size of the HTTP request message in bytes, including the request headers
# and the request body.
# Corresponds to the JSON property `requestSize`
# @return [String]
attr_accessor :request_size
# The scheme (http, https), the host name, the path and the query portion of the
# URL that was requested. Example: "http://example.com/some/info?color=red".
# Corresponds to the JSON property `requestUrl`
# @return [String]
attr_accessor :request_url
# The IP address (IPv4 or IPv6) of the origin server that the request was sent
# to.
# Corresponds to the JSON property `serverIp`
@ -457,53 +501,19 @@ module Google
# @return [String]
attr_accessor :referer
# The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
# Windows 98; Q312461; .NET CLR 1.0.3705)".
# Corresponds to the JSON property `userAgent`
# @return [String]
attr_accessor :user_agent
# The request processing latency on the server, from the time the request was
# received until the response was sent.
# Corresponds to the JSON property `latency`
# @return [String]
attr_accessor :latency
# The number of HTTP response bytes inserted into cache. Set only when a cache
# fill was attempted.
# Corresponds to the JSON property `cacheFillBytes`
# @return [String]
attr_accessor :cache_fill_bytes
# The request method. Examples: "GET", "HEAD", "PUT", "POST".
# Corresponds to the JSON property `requestMethod`
# @return [String]
attr_accessor :request_method
# The size of the HTTP request message in bytes, including the request headers
# and the request body.
# Corresponds to the JSON property `requestSize`
# @return [String]
attr_accessor :request_size
# The size of the HTTP response message sent back to the client, in bytes,
# including the response headers and the response body.
# Corresponds to the JSON property `responseSize`
# @return [String]
attr_accessor :response_size
# The scheme (http, https), the host name, the path and the query portion of the
# URL that was requested. Example: "http://example.com/some/info?color=red".
# Corresponds to the JSON property `requestUrl`
# @return [String]
attr_accessor :request_url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@user_agent = args[:user_agent] if args.key?(:user_agent)
@latency = args[:latency] if args.key?(:latency)
@cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
@request_method = args[:request_method] if args.key?(:request_method)
@response_size = args[:response_size] if args.key?(:response_size)
@request_size = args[:request_size] if args.key?(:request_size)
@request_url = args[:request_url] if args.key?(:request_url)
@server_ip = args[:server_ip] if args.key?(:server_ip)
@remote_ip = args[:remote_ip] if args.key?(:remote_ip)
@cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup)
@ -511,13 +521,6 @@ module Google
@cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server)
@status = args[:status] if args.key?(:status)
@referer = args[:referer] if args.key?(:referer)
@user_agent = args[:user_agent] if args.key?(:user_agent)
@latency = args[:latency] if args.key?(:latency)
@cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
@request_method = args[:request_method] if args.key?(:request_method)
@request_size = args[:request_size] if args.key?(:request_size)
@response_size = args[:response_size] if args.key?(:response_size)
@request_url = args[:request_url] if args.key?(:request_url)
end
end
@ -525,11 +528,6 @@ module Google
class ListSinksResponse
include Google::Apis::Core::Hashable
# A list of sinks.
# Corresponds to the JSON property `sinks`
# @return [Array<Google::Apis::LoggingV2beta1::LogSink>]
attr_accessor :sinks
# If there might be more results than appear in this response, then
# nextPageToken is included. To get the next set of results, call the same
# method again using the value of nextPageToken as pageToken.
@ -537,14 +535,19 @@ module Google
# @return [String]
attr_accessor :next_page_token
# A list of sinks.
# Corresponds to the JSON property `sinks`
# @return [Array<Google::Apis::LoggingV2beta1::LogSink>]
attr_accessor :sinks
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@sinks = args[:sinks] if args.key?(:sinks)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@sinks = args[:sinks] if args.key?(:sinks)
end
end
@ -552,11 +555,6 @@ module Google
class LabelDescriptor
include Google::Apis::Core::Hashable
# The type of data that can be assigned to the label.
# Corresponds to the JSON property `valueType`
# @return [String]
attr_accessor :value_type
# The label key.
# Corresponds to the JSON property `key`
# @return [String]
@ -567,15 +565,20 @@ module Google
# @return [String]
attr_accessor :description
# The type of data that can be assigned to the label.
# Corresponds to the JSON property `valueType`
# @return [String]
attr_accessor :value_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@value_type = args[:value_type] if args.key?(:value_type)
@key = args[:key] if args.key?(:key)
@description = args[:description] if args.key?(:description)
@value_type = args[:value_type] if args.key?(:value_type)
end
end
@ -645,6 +648,12 @@ module Google
class LogEntrySourceLocation
include Google::Apis::Core::Hashable
# Optional. Source file name. Depending on the runtime environment, this might
# be a simple name or a fully-qualified name.
# Corresponds to the JSON property `file`
# @return [String]
attr_accessor :file
# Optional. Human-readable name of the function or method being invoked, with
# optional context such as the class or package name. This information may be
# used in contexts such as the logs viewer, where a file and line number are
@ -660,21 +669,15 @@ module Google
# @return [String]
attr_accessor :line
# Optional. Source file name. Depending on the runtime environment, this might
# be a simple name or a fully-qualified name.
# Corresponds to the JSON property `file`
# @return [String]
attr_accessor :file
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@file = args[:file] if args.key?(:file)
@function = args[:function] if args.key?(:function)
@line = args[:line] if args.key?(:line)
@file = args[:file] if args.key?(:file)
end
end
@ -682,6 +685,11 @@ module Google
class ListLogEntriesResponse
include Google::Apis::Core::Hashable
# A list of log entries.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
attr_accessor :entries
# If there might be more results than those appearing in this response, then
# nextPageToken is included. To get the next set of results, call this method
# again using the value of nextPageToken as pageToken.If a value for
@ -695,19 +703,14 @@ module Google
# @return [String]
attr_accessor :next_page_token
# A list of log entries.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
attr_accessor :entries
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@entries = args[:entries] if args.key?(:entries)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
@ -715,16 +718,6 @@ module Google
class LogLine
include Google::Apis::Core::Hashable
# Severity of this log entry.
# Corresponds to the JSON property `severity`
# @return [String]
attr_accessor :severity
# App-provided log message.
# Corresponds to the JSON property `logMessage`
# @return [String]
attr_accessor :log_message
# Specifies a location in a source code file.
# Corresponds to the JSON property `sourceLocation`
# @return [Google::Apis::LoggingV2beta1::SourceLocation]
@ -735,16 +728,26 @@ module Google
# @return [String]
attr_accessor :time
# Severity of this log entry.
# Corresponds to the JSON property `severity`
# @return [String]
attr_accessor :severity
# App-provided log message.
# Corresponds to the JSON property `logMessage`
# @return [String]
attr_accessor :log_message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@severity = args[:severity] if args.key?(:severity)
@log_message = args[:log_message] if args.key?(:log_message)
@source_location = args[:source_location] if args.key?(:source_location)
@time = args[:time] if args.key?(:time)
@severity = args[:severity] if args.key?(:severity)
@log_message = args[:log_message] if args.key?(:log_message)
end
end
@ -779,21 +782,11 @@ module Google
class LogEntry
include Google::Apis::Core::Hashable
# Additional information about the source code location that produced the log
# entry.
# Corresponds to the JSON property `sourceLocation`
# @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation]
attr_accessor :source_location
# Optional. The time the event described by the log entry occurred. If omitted,
# Stackdriver Logging will use the time the log entry is received.
# Corresponds to the JSON property `timestamp`
# @return [String]
attr_accessor :timestamp
# Required. The resource name of the log to which this log entry belongs:
# "projects/[PROJECT_ID]/logs/[LOG_ID]"
# "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
# "folders/[FOLDER_ID]/logs/[LOG_ID]"
# [LOG_ID] must be URL-encoded within log_name. Example: "organizations/
# 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must
# be less than 512 characters long and can only include the following characters:
@ -807,6 +800,13 @@ module Google
# @return [String]
attr_accessor :log_name
# A common proto for logging HTTP requests. Only contains semantics defined by
# the HTTP specification. Product-specific logging information MUST be defined
# in a separate message.
# Corresponds to the JSON property `httpRequest`
# @return [Google::Apis::LoggingV2beta1::HttpRequest]
attr_accessor :http_request
# An object representing a resource that can be used for monitoring, logging,
# billing, or other purposes. Examples include virtual machine instances,
# databases, and storage devices such as disks. The type field identifies a
@ -823,13 +823,6 @@ module Google
# @return [Google::Apis::LoggingV2beta1::MonitoredResource]
attr_accessor :resource
# A common proto for logging HTTP requests. Only contains semantics defined by
# the HTTP specification. Product-specific logging information MUST be defined
# in a separate message.
# Corresponds to the JSON property `httpRequest`
# @return [Google::Apis::LoggingV2beta1::HttpRequest]
attr_accessor :http_request
# The log entry payload, represented as a structure that is expressed as a JSON
# object.
# Corresponds to the JSON property `jsonPayload`
@ -881,17 +874,27 @@ module Google
# @return [String]
attr_accessor :severity
# Additional information about the source code location that produced the log
# entry.
# Corresponds to the JSON property `sourceLocation`
# @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation]
attr_accessor :source_location
# Optional. The time the event described by the log entry occurred. If omitted,
# Stackdriver Logging will use the time the log entry is received.
# Corresponds to the JSON property `timestamp`
# @return [String]
attr_accessor :timestamp
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@source_location = args[:source_location] if args.key?(:source_location)
@timestamp = args[:timestamp] if args.key?(:timestamp)
@log_name = args[:log_name] if args.key?(:log_name)
@resource = args[:resource] if args.key?(:resource)
@http_request = args[:http_request] if args.key?(:http_request)
@resource = args[:resource] if args.key?(:resource)
@json_payload = args[:json_payload] if args.key?(:json_payload)
@insert_id = args[:insert_id] if args.key?(:insert_id)
@operation = args[:operation] if args.key?(:operation)
@ -900,6 +903,8 @@ module Google
@trace = args[:trace] if args.key?(:trace)
@labels = args[:labels] if args.key?(:labels)
@severity = args[:severity] if args.key?(:severity)
@source_location = args[:source_location] if args.key?(:source_location)
@timestamp = args[:timestamp] if args.key?(:timestamp)
end
end
@ -972,22 +977,17 @@ module Google
# @return [String]
attr_accessor :order_by
# Required. Names of one or more resources from which to retrieve log entries:
# Required. Names of one or more parent resources from which to retrieve log
# entries:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]"
# "folders/[FOLDER_ID]"
# Projects listed in the project_ids field are added to this list.
# Corresponds to the JSON property `resourceNames`
# @return [Array<String>]
attr_accessor :resource_names
# Deprecated. Use resource_names instead. One or more project identifiers or
# project numbers from which to retrieve log entries. Example: "my-project-1A".
# If present, these project identifiers are converted to resource name format
# and added to the list of resources in resource_names.
# Corresponds to the JSON property `projectIds`
# @return [Array<String>]
attr_accessor :project_ids
# Optional. A filter that chooses which log entries to return. See Advanced Logs
# Filters. Only log entries that match the filter are returned. An empty filter
# matches all log entries in the resources listed in resource_names. Referencing
@ -997,6 +997,14 @@ module Google
# @return [String]
attr_accessor :filter
# Deprecated. Use resource_names instead. One or more project identifiers or
# project numbers from which to retrieve log entries. Example: "my-project-1A".
# If present, these project identifiers are converted to resource name format
# and added to the list of resources in resource_names.
# Corresponds to the JSON property `projectIds`
# @return [Array<String>]
attr_accessor :project_ids
# Optional. If present, then retrieve the next batch of results from the
# preceding call to this method. pageToken must be the value of nextPageToken
# from the previous response. The values of other method parameters should be
@ -1020,8 +1028,8 @@ module Google
def update!(**args)
@order_by = args[:order_by] if args.key?(:order_by)
@resource_names = args[:resource_names] if args.key?(:resource_names)
@project_ids = args[:project_ids] if args.key?(:project_ids)
@filter = args[:filter] if args.key?(:filter)
@project_ids = args[:project_ids] if args.key?(:project_ids)
@page_token = args[:page_token] if args.key?(:page_token)
@page_size = args[:page_size] if args.key?(:page_size)
end
@ -1032,6 +1040,100 @@ module Google
class RequestLog
include Google::Apis::Core::Hashable
# The logged-in user who made the request.Most likely, this is the part of the
# user's email before the @ sign. The field value is the same for different
# requests from the same user, but different users can have similar names. This
# information is also available to the application via the App Engine Users API.
# This field will be populated starting with App Engine 1.9.21.
# Corresponds to the JSON property `nickname`
# @return [String]
attr_accessor :nickname
# HTTP response status code. Example: 200, 404.
# Corresponds to the JSON property `status`
# @return [Fixnum]
attr_accessor :status
# Contains the path and query portion of the URL that was requested. For example,
# if the URL was "http://example.com/app?name=val", the resource would be "/app?
# name=val". The fragment identifier, which is identified by the # character, is
# not included.
# Corresponds to the JSON property `resource`
# @return [String]
attr_accessor :resource
# Time this request spent in the pending request queue.
# Corresponds to the JSON property `pendingTime`
# @return [String]
attr_accessor :pending_time
# Task name of the request, in the case of an offline request.
# Corresponds to the JSON property `taskName`
# @return [String]
attr_accessor :task_name
# File or class that handled the request.
# Corresponds to the JSON property `urlMapEntry`
# @return [String]
attr_accessor :url_map_entry
# If the instance processing this request belongs to a manually scaled module,
# then this is the 0-based index of the instance. Otherwise, this value is -1.
# Corresponds to the JSON property `instanceIndex`
# @return [Fixnum]
attr_accessor :instance_index
# Whether this request is finished or active.
# Corresponds to the JSON property `finished`
# @return [Boolean]
attr_accessor :finished
alias_method :finished?, :finished
# Internet host and port number of the resource being requested.
# Corresponds to the JSON property `host`
# @return [String]
attr_accessor :host
# HTTP version of request. Example: "HTTP/1.1".
# Corresponds to the JSON property `httpVersion`
# @return [String]
attr_accessor :http_version
# Time when the request started.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# Latency of the request.
# Corresponds to the JSON property `latency`
# @return [String]
attr_accessor :latency
# Origin IP address.
# Corresponds to the JSON property `ip`
# @return [String]
attr_accessor :ip
# Application that handled this request.
# Corresponds to the JSON property `appId`
# @return [String]
attr_accessor :app_id
# App Engine release version.
# Corresponds to the JSON property `appEngineRelease`
# @return [String]
attr_accessor :app_engine_release
# Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
# Corresponds to the JSON property `method`
# @return [String]
attr_accessor :method_prop
# An indication of the relative cost of serving this request.
# Corresponds to the JSON property `cost`
# @return [Float]
attr_accessor :cost
# An identifier for the instance that handled the request.
# Corresponds to the JSON property `instanceId`
# @return [String]
@ -1098,16 +1200,16 @@ module Google
# @return [Array<Google::Apis::LoggingV2beta1::LogLine>]
attr_accessor :line
# Queue name of the request, in the case of an offline request.
# Corresponds to the JSON property `taskQueueName`
# @return [String]
attr_accessor :task_queue_name
# Referrer URL of request.
# Corresponds to the JSON property `referrer`
# @return [String]
attr_accessor :referrer
# Queue name of the request, in the case of an offline request.
# Corresponds to the JSON property `taskQueueName`
# @return [String]
attr_accessor :task_queue_name
# Globally unique identifier for a request, which is based on the request start
# time. Request IDs for requests which started later will compare greater as
# strings than those for requests which started earlier.
@ -1115,106 +1217,29 @@ module Google
# @return [String]
attr_accessor :request_id
# The logged-in user who made the request.Most likely, this is the part of the
# user's email before the @ sign. The field value is the same for different
# requests from the same user, but different users can have similar names. This
# information is also available to the application via the App Engine Users API.
# This field will be populated starting with App Engine 1.9.21.
# Corresponds to the JSON property `nickname`
# @return [String]
attr_accessor :nickname
# Time this request spent in the pending request queue.
# Corresponds to the JSON property `pendingTime`
# @return [String]
attr_accessor :pending_time
# Contains the path and query portion of the URL that was requested. For example,
# if the URL was "http://example.com/app?name=val", the resource would be "/app?
# name=val". The fragment identifier, which is identified by the # character, is
# not included.
# Corresponds to the JSON property `resource`
# @return [String]
attr_accessor :resource
# HTTP response status code. Example: 200, 404.
# Corresponds to the JSON property `status`
# @return [Fixnum]
attr_accessor :status
# Task name of the request, in the case of an offline request.
# Corresponds to the JSON property `taskName`
# @return [String]
attr_accessor :task_name
# File or class that handled the request.
# Corresponds to the JSON property `urlMapEntry`
# @return [String]
attr_accessor :url_map_entry
# If the instance processing this request belongs to a manually scaled module,
# then this is the 0-based index of the instance. Otherwise, this value is -1.
# Corresponds to the JSON property `instanceIndex`
# @return [Fixnum]
attr_accessor :instance_index
# Internet host and port number of the resource being requested.
# Corresponds to the JSON property `host`
# @return [String]
attr_accessor :host
# Whether this request is finished or active.
# Corresponds to the JSON property `finished`
# @return [Boolean]
attr_accessor :finished
alias_method :finished?, :finished
# HTTP version of request. Example: "HTTP/1.1".
# Corresponds to the JSON property `httpVersion`
# @return [String]
attr_accessor :http_version
# Time when the request started.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# Latency of the request.
# Corresponds to the JSON property `latency`
# @return [String]
attr_accessor :latency
# Origin IP address.
# Corresponds to the JSON property `ip`
# @return [String]
attr_accessor :ip
# Application that handled this request.
# Corresponds to the JSON property `appId`
# @return [String]
attr_accessor :app_id
# App Engine release version.
# Corresponds to the JSON property `appEngineRelease`
# @return [String]
attr_accessor :app_engine_release
# Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
# Corresponds to the JSON property `method`
# @return [String]
attr_accessor :method_prop
# An indication of the relative cost of serving this request.
# Corresponds to the JSON property `cost`
# @return [Float]
attr_accessor :cost
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@nickname = args[:nickname] if args.key?(:nickname)
@status = args[:status] if args.key?(:status)
@resource = args[:resource] if args.key?(:resource)
@pending_time = args[:pending_time] if args.key?(:pending_time)
@task_name = args[:task_name] if args.key?(:task_name)
@url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
@instance_index = args[:instance_index] if args.key?(:instance_index)
@finished = args[:finished] if args.key?(:finished)
@host = args[:host] if args.key?(:host)
@http_version = args[:http_version] if args.key?(:http_version)
@start_time = args[:start_time] if args.key?(:start_time)
@latency = args[:latency] if args.key?(:latency)
@ip = args[:ip] if args.key?(:ip)
@app_id = args[:app_id] if args.key?(:app_id)
@app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release)
@method_prop = args[:method_prop] if args.key?(:method_prop)
@cost = args[:cost] if args.key?(:cost)
@instance_id = args[:instance_id] if args.key?(:instance_id)
@mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles)
@first = args[:first] if args.key?(:first)
@ -1227,26 +1252,9 @@ module Google
@response_size = args[:response_size] if args.key?(:response_size)
@trace_id = args[:trace_id] if args.key?(:trace_id)
@line = args[:line] if args.key?(:line)
@task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
@referrer = args[:referrer] if args.key?(:referrer)
@task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
@request_id = args[:request_id] if args.key?(:request_id)
@nickname = args[:nickname] if args.key?(:nickname)
@pending_time = args[:pending_time] if args.key?(:pending_time)
@resource = args[:resource] if args.key?(:resource)
@status = args[:status] if args.key?(:status)
@task_name = args[:task_name] if args.key?(:task_name)
@url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
@instance_index = args[:instance_index] if args.key?(:instance_index)
@host = args[:host] if args.key?(:host)
@finished = args[:finished] if args.key?(:finished)
@http_version = args[:http_version] if args.key?(:http_version)
@start_time = args[:start_time] if args.key?(:start_time)
@latency = args[:latency] if args.key?(:latency)
@ip = args[:ip] if args.key?(:ip)
@app_id = args[:app_id] if args.key?(:app_id)
@app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release)
@method_prop = args[:method_prop] if args.key?(:method_prop)
@cost = args[:cost] if args.key?(:cost)
end
end
end

View File

@ -58,13 +58,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class LogSink
class WriteLogEntriesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class WriteLogEntriesRequest
class LogSink
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -157,17 +157,17 @@ module Google
class ListMonitoredResourceDescriptorsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class SourceReference
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :revision_id, as: 'revisionId'
property :repository, as: 'repository'
property :revision_id, as: 'revisionId'
end
end
@ -205,19 +205,6 @@ module Google
end
end
class LogSink
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :destination, as: 'destination'
property :filter, as: 'filter'
property :end_time, as: 'endTime'
property :start_time, as: 'startTime'
property :writer_identity, as: 'writerIdentity'
property :output_version_format, as: 'outputVersionFormat'
end
end
class WriteLogEntriesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -231,17 +218,37 @@ module Google
end
end
class LogSink
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :filter, as: 'filter'
property :destination, as: 'destination'
property :end_time, as: 'endTime'
property :start_time, as: 'startTime'
property :writer_identity, as: 'writerIdentity'
property :output_version_format, as: 'outputVersionFormat'
end
end
class ListLogsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :log_names, as: 'logNames'
property :next_page_token, as: 'nextPageToken'
end
end
class HttpRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :user_agent, as: 'userAgent'
property :latency, as: 'latency'
property :cache_fill_bytes, as: 'cacheFillBytes'
property :request_method, as: 'requestMethod'
property :response_size, as: 'responseSize'
property :request_size, as: 'requestSize'
property :request_url, as: 'requestUrl'
property :server_ip, as: 'serverIp'
property :remote_ip, as: 'remoteIp'
property :cache_lookup, as: 'cacheLookup'
@ -249,31 +256,24 @@ module Google
property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer'
property :status, as: 'status'
property :referer, as: 'referer'
property :user_agent, as: 'userAgent'
property :latency, as: 'latency'
property :cache_fill_bytes, as: 'cacheFillBytes'
property :request_method, as: 'requestMethod'
property :request_size, as: 'requestSize'
property :response_size, as: 'responseSize'
property :request_url, as: 'requestUrl'
end
end
class ListSinksResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class LabelDescriptor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :value_type, as: 'valueType'
property :key, as: 'key'
property :description, as: 'description'
property :value_type, as: 'valueType'
end
end
@ -292,29 +292,29 @@ module Google
class LogEntrySourceLocation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :file, as: 'file'
property :function, as: 'function'
property :line, as: 'line'
property :file, as: 'file'
end
end
class ListLogEntriesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class LogLine
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :severity, as: 'severity'
property :log_message, as: 'logMessage'
property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::SourceLocation, decorator: Google::Apis::LoggingV2beta1::SourceLocation::Representation
property :time, as: 'time'
property :severity, as: 'severity'
property :log_message, as: 'logMessage'
end
end
@ -330,14 +330,11 @@ module Google
class LogEntry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2beta1::LogEntrySourceLocation::Representation
property :timestamp, as: 'timestamp'
property :log_name, as: 'logName'
property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation
property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2beta1::HttpRequest, decorator: Google::Apis::LoggingV2beta1::HttpRequest::Representation
property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation
hash :json_payload, as: 'jsonPayload'
property :insert_id, as: 'insertId'
property :operation, as: 'operation', class: Google::Apis::LoggingV2beta1::LogEntryOperation, decorator: Google::Apis::LoggingV2beta1::LogEntryOperation::Representation
@ -347,6 +344,9 @@ module Google
property :trace, as: 'trace'
hash :labels, as: 'labels'
property :severity, as: 'severity'
property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2beta1::LogEntrySourceLocation::Representation
property :timestamp, as: 'timestamp'
end
end
@ -370,8 +370,8 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
property :order_by, as: 'orderBy'
collection :resource_names, as: 'resourceNames'
collection :project_ids, as: 'projectIds'
property :filter, as: 'filter'
collection :project_ids, as: 'projectIds'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
end
@ -380,6 +380,23 @@ module Google
class RequestLog
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :nickname, as: 'nickname'
property :status, as: 'status'
property :resource, as: 'resource'
property :pending_time, as: 'pendingTime'
property :task_name, as: 'taskName'
property :url_map_entry, as: 'urlMapEntry'
property :instance_index, as: 'instanceIndex'
property :finished, as: 'finished'
property :host, as: 'host'
property :http_version, as: 'httpVersion'
property :start_time, as: 'startTime'
property :latency, as: 'latency'
property :ip, as: 'ip'
property :app_id, as: 'appId'
property :app_engine_release, as: 'appEngineRelease'
property :method_prop, as: 'method'
property :cost, as: 'cost'
property :instance_id, as: 'instanceId'
property :mega_cycles, as: 'megaCycles'
property :first, as: 'first'
@ -394,26 +411,9 @@ module Google
property :trace_id, as: 'traceId'
collection :line, as: 'line', class: Google::Apis::LoggingV2beta1::LogLine, decorator: Google::Apis::LoggingV2beta1::LogLine::Representation
property :task_queue_name, as: 'taskQueueName'
property :referrer, as: 'referrer'
property :task_queue_name, as: 'taskQueueName'
property :request_id, as: 'requestId'
property :nickname, as: 'nickname'
property :pending_time, as: 'pendingTime'
property :resource, as: 'resource'
property :status, as: 'status'
property :task_name, as: 'taskName'
property :url_map_entry, as: 'urlMapEntry'
property :instance_index, as: 'instanceIndex'
property :host, as: 'host'
property :finished, as: 'finished'
property :http_version, as: 'httpVersion'
property :start_time, as: 'startTime'
property :latency, as: 'latency'
property :ip, as: 'ip'
property :app_id, as: 'appId'
property :app_engine_release, as: 'appEngineRelease'
property :method_prop, as: 'method'
property :cost, as: 'cost'
end
end
end

View File

@ -46,9 +46,18 @@ module Google
super('https://logging.googleapis.com/', '')
end
# Lists log entries. Use this method to retrieve log entries from Stackdriver
# Logging. For ways to export log entries, see Exporting Logs.
# @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object
# Deletes all the log entries in a log. The log reappears if it receives new
# entries. Log entries written shortly before the delete operation might not be
# deleted.
# @param [String] log_name
# Required. The resource name of the log to delete:
# "projects/[PROJECT_ID]/logs/[LOG_ID]"
# "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
# "folders/[FOLDER_ID]/logs/[LOG_ID]"
# [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
# , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
# 2Factivity". For more information about log names, see LogEntry.
# @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.
@ -58,28 +67,41 @@ module Google
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object
# @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse]
# @return [Google::Apis::LoggingV2beta1::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 list_entry_log_entries(list_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/entries:list', options)
command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation
command.request_object = list_log_entries_request_object
command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse
def delete_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
command.response_class = Google::Apis::LoggingV2beta1::Empty
command.params['logName'] = log_name unless log_name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Writes log entries to Stackdriver Logging. All log entries are written by this
# method.
# @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object
# Lists the logs in projects, organizations, folders, or billing accounts. Only
# logs that have entries are listed.
# @param [String] parent
# Required. The resource name that owns the logs:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]"
# "folders/[FOLDER_ID]"
# @param [String] page_token
# Optional. If present, then retrieve the next batch of results from the
# preceding call to this method. pageToken must be the value of nextPageToken
# from the previous response. The values of other method parameters should be
# identical to those in the previous call.
# @param [Fixnum] page_size
# Optional. The maximum number of results to return from this request. Non-
# positive values are ignored. The presence of nextPageToken in the response
# indicates that more results might be available.
# @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.
@ -89,20 +111,276 @@ module Google
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object
# @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse]
# @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
#
# @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 write_entry_log_entries(write_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/entries:write', options)
command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation
command.request_object = write_log_entries_request_object
command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse
def list_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Creates a sink that exports specified log entries to a destination. The export
# of newly-ingested log entries begins immediately, unless the current time is
# outside the sink's start and end times or the sink's writer_identity is not
# permitted to write to the destination. A sink can export log entries only from
# the resource owning the sink.
# @param [String] parent
# Required. The resource in which to create the sink:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]"
# "folders/[FOLDER_ID]"
# Examples: "projects/my-logging-project", "organizations/123456789".
# @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
# @param [Boolean] unique_writer_identity
# Optional. Determines the kind of IAM identity returned as writer_identity in
# the new sink. If this value is omitted or set to false, and if the sink's
# parent is a project, then the value returned as writer_identity is cloud-logs@
# system.gserviceaccount.com, the same identity used before the addition of
# writer identities to this API. The sink's destination must be in the same
# project as the sink itself.If this field is set to true, or if the sink is
# owned by a non-project resource such as an organization, then the value of
# writer_identity will be a unique service account used only for exports from
# the new sink. For more information, see writer_identity in LogSink.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::LogSink]
#
# @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_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options)
command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.request_object = log_sink_object
command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.response_class = Google::Apis::LoggingV2beta1::LogSink
command.params['parent'] = parent unless parent.nil?
command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes a sink. If the sink has a unique writer_identity, then that service
# account is also deleted.
# @param [String] sink_name
# Required. The full resource name of the sink to delete, including the parent
# resource and the sink identifier:
# "projects/[PROJECT_ID]/sinks/[SINK_ID]"
# "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
# "folders/[FOLDER_ID]/sinks/[SINK_ID]"
# Example: "projects/my-project-id/sinks/my-sink-id".
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::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_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
command.response_class = Google::Apis::LoggingV2beta1::Empty
command.params['sinkName'] = sink_name unless sink_name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists sinks.
# @param [String] parent
# Required. The parent resource whose sinks are to be listed:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]"
# "folders/[FOLDER_ID]"
# @param [String] page_token
# Optional. If present, then retrieve the next batch of results from the
# preceding call to this method. pageToken must be the value of nextPageToken
# from the previous response. The values of other method parameters should be
# identical to those in the previous call.
# @param [Fixnum] page_size
# Optional. The maximum number of results to return from this request. Non-
# positive values are ignored. The presence of nextPageToken in the response
# indicates that more results might be available.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::ListSinksResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::ListSinksResponse]
#
# @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_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options)
command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets a sink.
# @param [String] sink_name
# Required. The resource name of the sink:
# "projects/[PROJECT_ID]/sinks/[SINK_ID]"
# "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
# "folders/[FOLDER_ID]/sinks/[SINK_ID]"
# Example: "projects/my-project-id/sinks/my-sink-id".
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::LogSink]
#
# @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_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+sinkName}', options)
command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.response_class = Google::Apis::LoggingV2beta1::LogSink
command.params['sinkName'] = sink_name unless sink_name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Updates a sink. If the named sink doesn't exist, then this method is identical
# to sinks.create. If the named sink does exist, then this method replaces the
# following fields in the existing sink with values from the new sink:
# destination, filter, output_version_format, start_time, and end_time. The
# updated filter might also have a new writer_identity; see the
# unique_writer_identity field.
# @param [String] sink_name
# Required. The full resource name of the sink to update, including the parent
# resource and the sink identifier:
# "projects/[PROJECT_ID]/sinks/[SINK_ID]"
# "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
# "folders/[FOLDER_ID]/sinks/[SINK_ID]"
# Example: "projects/my-project-id/sinks/my-sink-id".
# @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
# @param [Boolean] unique_writer_identity
# Optional. See sinks.create for a description of this field. When updating a
# sink, the effect of this field on the value of writer_identity in the updated
# sink depends on both the old and new values of this field:
# If the old and new values of this field are both false or both true, then
# there is no change to the sink's writer_identity.
# If the old value was false and the new value is true, then writer_identity is
# changed to a unique service account.
# It is an error if the old value was true and the new value is false.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::LogSink]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v2beta1/{+sinkName}', options)
command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.request_object = log_sink_object
command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.response_class = Google::Apis::LoggingV2beta1::LogSink
command.params['sinkName'] = sink_name unless sink_name.nil?
command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes a logs-based metric.
# @param [String] metric_name
# The resource name of the metric to delete:
# "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::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_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
command.response_class = Google::Apis::LoggingV2beta1::Empty
command.params['metricName'] = metric_name unless metric_name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
@ -253,337 +531,15 @@ module Google
execute_or_queue_command(command, &block)
end
# Deletes a logs-based metric.
# @param [String] metric_name
# The resource name of the metric to delete:
# "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::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_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
command.response_class = Google::Apis::LoggingV2beta1::Empty
command.params['metricName'] = metric_name unless metric_name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes all the log entries in a log. The log reappears if it receives new
# entries.
# @param [String] log_name
# Required. The resource name of the log to delete:
# "projects/[PROJECT_ID]/logs/[LOG_ID]"
# "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
# [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
# , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
# 2Factivity". For more information about log names, see LogEntry.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::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_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
command.response_class = Google::Apis::LoggingV2beta1::Empty
command.params['logName'] = log_name unless log_name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists the logs in projects or organizations. Only logs that have entries are
# listed.
# @param [String] parent
# Required. The resource name that owns the logs:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# @param [String] page_token
# Optional. If present, then retrieve the next batch of results from the
# preceding call to this method. pageToken must be the value of nextPageToken
# from the previous response. The values of other method parameters should be
# identical to those in the previous call.
# @param [Fixnum] page_size
# Optional. The maximum number of results to return from this request. Non-
# positive values are ignored. The presence of nextPageToken in the response
# indicates that more results might be available.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
#
# @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_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists sinks.
# @param [String] parent
# Required. The parent resource whose sinks are to be listed. Examples: "
# projects/my-logging-project", "organizations/123456789".
# @param [Fixnum] page_size
# Optional. The maximum number of results to return from this request. Non-
# positive values are ignored. The presence of nextPageToken in the response
# indicates that more results might be available.
# @param [String] page_token
# Optional. If present, then retrieve the next batch of results from the
# preceding call to this method. pageToken must be the value of nextPageToken
# from the previous response. The values of other method parameters should be
# identical to those in the previous call.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::ListSinksResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::ListSinksResponse]
#
# @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_sinks(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options)
command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets a sink.
# @param [String] sink_name
# Required. The parent resource name of the sink:
# "projects/[PROJECT_ID]/sinks/[SINK_ID]"
# "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
# Example: "projects/my-project-id/sinks/my-sink-id".
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::LogSink]
#
# @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_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+sinkName}', options)
command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.response_class = Google::Apis::LoggingV2beta1::LogSink
command.params['sinkName'] = sink_name unless sink_name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Updates a sink. If the named sink doesn't exist, then this method is identical
# to sinks.create. If the named sink does exist, then this method replaces the
# following fields in the existing sink with values from the new sink:
# destination, filter, output_version_format, start_time, and end_time. The
# updated filter might also have a new writer_identity; see the
# unique_writer_identity field.
# @param [String] sink_name
# Required. The full resource name of the sink to update, including the parent
# resource and the sink identifier:
# "projects/[PROJECT_ID]/sinks/[SINK_ID]"
# "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
# Example: "projects/my-project-id/sinks/my-sink-id".
# @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
# @param [Boolean] unique_writer_identity
# Optional. See sinks.create for a description of this field. When updating a
# sink, the effect of this field on the value of writer_identity in the updated
# sink depends on both the old and new values of this field:
# If the old and new values of this field are both false or both true, then
# there is no change to the sink's writer_identity.
# If the old value was false and the new value is true, then writer_identity is
# changed to a unique service account.
# It is an error if the old value was true and the new value is false.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::LogSink]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v2beta1/{+sinkName}', options)
command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.request_object = log_sink_object
command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.response_class = Google::Apis::LoggingV2beta1::LogSink
command.params['sinkName'] = sink_name unless sink_name.nil?
command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Creates a sink that exports specified log entries to a destination. The export
# of newly-ingested log entries begins immediately, unless the current time is
# outside the sink's start and end times or the sink's writer_identity is not
# permitted to write to the destination. A sink can export log entries only from
# the resource owning the sink.
# @param [String] parent
# Required. The resource in which to create the sink:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# Examples: "projects/my-logging-project", "organizations/123456789".
# @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
# @param [Boolean] unique_writer_identity
# Optional. Determines the kind of IAM identity returned as writer_identity in
# the new sink. If this value is omitted or set to false, and if the sink's
# parent is a project, then the value returned as writer_identity is cloud-logs@
# system.gserviceaccount.com, the same identity used before the addition of
# writer identities to this API. The sink's destination must be in the same
# project as the sink itself.If this field is set to true, or if the sink is
# owned by a non-project resource such as an organization, then the value of
# writer_identity will be a unique service account used only for exports from
# the new sink. For more information, see writer_identity in LogSink.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::LogSink]
#
# @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_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options)
command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.request_object = log_sink_object
command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
command.response_class = Google::Apis::LoggingV2beta1::LogSink
command.params['parent'] = parent unless parent.nil?
command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes a sink. If the sink has a unique writer_identity, then that service
# account is also deleted.
# @param [String] sink_name
# Required. The full resource name of the sink to delete, including the parent
# resource and the sink identifier:
# "projects/[PROJECT_ID]/sinks/[SINK_ID]"
# "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
# It is an error if the sink does not exist. Example: "projects/my-project-id/
# sinks/my-sink-id". It is an error if the sink does not exist.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::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_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
command.response_class = Google::Apis::LoggingV2beta1::Empty
command.params['sinkName'] = sink_name unless sink_name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes all the log entries in a log. The log reappears if it receives new
# entries.
# entries. Log entries written shortly before the delete operation might not be
# deleted.
# @param [String] log_name
# Required. The resource name of the log to delete:
# "projects/[PROJECT_ID]/logs/[LOG_ID]"
# "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
# "folders/[FOLDER_ID]/logs/[LOG_ID]"
# [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
# , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
# 2Factivity". For more information about log names, see LogEntry.
@ -614,21 +570,23 @@ module Google
execute_or_queue_command(command, &block)
end
# Lists the logs in projects or organizations. Only logs that have entries are
# listed.
# Lists the logs in projects, organizations, folders, or billing accounts. Only
# logs that have entries are listed.
# @param [String] parent
# Required. The resource name that owns the logs:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# @param [Fixnum] page_size
# Optional. The maximum number of results to return from this request. Non-
# positive values are ignored. The presence of nextPageToken in the response
# indicates that more results might be available.
# "billingAccounts/[BILLING_ACCOUNT_ID]"
# "folders/[FOLDER_ID]"
# @param [String] page_token
# Optional. If present, then retrieve the next batch of results from the
# preceding call to this method. pageToken must be the value of nextPageToken
# from the previous response. The values of other method parameters should be
# identical to those in the previous call.
# @param [Fixnum] page_size
# Optional. The maximum number of results to return from this request. Non-
# positive values are ignored. The presence of nextPageToken in the response
# indicates that more results might be available.
# @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.
@ -646,13 +604,13 @@ 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 list_billing_account_logs(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
def list_billing_account_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
@ -696,56 +654,15 @@ module Google
execute_or_queue_command(command, &block)
end
# Lists the logs in projects or organizations. Only logs that have entries are
# listed.
# @param [String] parent
# Required. The resource name that owns the logs:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# @param [Fixnum] page_size
# Optional. The maximum number of results to return from this request. Non-
# positive values are ignored. The presence of nextPageToken in the response
# indicates that more results might be available.
# @param [String] page_token
# Optional. If present, then retrieve the next batch of results from the
# preceding call to this method. pageToken must be the value of nextPageToken
# from the previous response. The values of other method parameters should be
# identical to those in the previous call.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
#
# @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_organization_logs(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes all the log entries in a log. The log reappears if it receives new
# entries.
# entries. Log entries written shortly before the delete operation might not be
# deleted.
# @param [String] log_name
# Required. The resource name of the log to delete:
# "projects/[PROJECT_ID]/logs/[LOG_ID]"
# "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
# "folders/[FOLDER_ID]/logs/[LOG_ID]"
# [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
# , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
# 2Factivity". For more information about log names, see LogEntry.
@ -775,6 +692,114 @@ module Google
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists the logs in projects, organizations, folders, or billing accounts. Only
# logs that have entries are listed.
# @param [String] parent
# Required. The resource name that owns the logs:
# "projects/[PROJECT_ID]"
# "organizations/[ORGANIZATION_ID]"
# "billingAccounts/[BILLING_ACCOUNT_ID]"
# "folders/[FOLDER_ID]"
# @param [String] page_token
# Optional. If present, then retrieve the next batch of results from the
# preceding call to this method. pageToken must be the value of nextPageToken
# from the previous response. The values of other method parameters should be
# identical to those in the previous call.
# @param [Fixnum] page_size
# Optional. The maximum number of results to return from this request. Non-
# positive values are ignored. The presence of nextPageToken in the response
# indicates that more results might be available.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
#
# @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_organization_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists log entries. Use this method to retrieve log entries from Stackdriver
# Logging. For ways to export log entries, see Exporting Logs.
# @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse]
#
# @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_entry_log_entries(list_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/entries:list', options)
command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation
command.request_object = list_log_entries_request_object
command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Writes log entries to Stackdriver Logging. All log entries are written by this
# method.
# @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse]
#
# @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 write_entry_log_entries(write_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/entries:write', options)
command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation
command.request_object = write_log_entries_request_object
command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation
command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
protected

View File

@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/monitoring/api/
module MonitoringV3
VERSION = 'V3'
REVISION = '20170203'
REVISION = '20170206'
# Publish metric data to your Google Cloud projects
AUTH_MONITORING_WRITE = 'https://www.googleapis.com/auth/monitoring.write'

View File

@ -22,33 +22,6 @@ module Google
module Apis
module MonitoringV3
# The ListGroups response.
class ListGroupsResponse
include Google::Apis::Core::Hashable
# If there are more results than have been returned, then this field is set to a
# non-empty value. To see the additional results, use that value as pageToken in
# the next call to this method.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The groups that match the specified filters.
# Corresponds to the JSON property `group`
# @return [Array<Google::Apis::MonitoringV3::Group>]
attr_accessor :group
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@group = args[:group] if args.key?(:group)
end
end
# The ListGroupMembers response.
class ListGroupMembersResponse
include Google::Apis::Core::Hashable
@ -86,6 +59,11 @@ module Google
class CreateCollectdTimeSeriesRequest
include Google::Apis::Core::Hashable
# The version of collectd that collected the data. Example: "5.3.0-192.el6".
# Corresponds to the JSON property `collectdVersion`
# @return [String]
attr_accessor :collectd_version
# An object representing a resource that can be used for monitoring, logging,
# billing, or other purposes. Examples include virtual machine instances,
# databases, and storage devices such as disks. The type field identifies a
@ -110,20 +88,15 @@ module Google
# @return [Array<Google::Apis::MonitoringV3::CollectdPayload>]
attr_accessor :collectd_payloads
# The version of collectd that collected the data. Example: "5.3.0-192.el6".
# Corresponds to the JSON property `collectdVersion`
# @return [String]
attr_accessor :collectd_version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@collectd_version = args[:collectd_version] if args.key?(:collectd_version)
@resource = args[:resource] if args.key?(:resource)
@collectd_payloads = args[:collectd_payloads] if args.key?(:collectd_payloads)
@collectd_version = args[:collectd_version] if args.key?(:collectd_version)
end
end
@ -131,12 +104,6 @@ module Google
class ListMonitoredResourceDescriptorsResponse
include Google::Apis::Core::Hashable
# The monitored resource descriptors that are available to this project and that
# match filter, if present.
# Corresponds to the JSON property `resourceDescriptors`
# @return [Array<Google::Apis::MonitoringV3::MonitoredResourceDescriptor>]
attr_accessor :resource_descriptors
# If there are more results than have been returned, then this field is set to a
# non-empty value. To see the additional results, use that value as pageToken in
# the next call to this method.
@ -144,14 +111,20 @@ module Google
# @return [String]
attr_accessor :next_page_token
# The monitored resource descriptors that are available to this project and that
# match filter, if present.
# Corresponds to the JSON property `resourceDescriptors`
# @return [Array<Google::Apis::MonitoringV3::MonitoredResourceDescriptor>]
attr_accessor :resource_descriptors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
end
end
@ -162,22 +135,6 @@ module Google
class TimeSeries
include Google::Apis::Core::Hashable
# An object representing a resource that can be used for monitoring, logging,
# billing, or other purposes. Examples include virtual machine instances,
# databases, and storage devices such as disks. The type field identifies a
# MonitoredResourceDescriptor object that describes the resource's schema.
# Information in the labels field identifies the actual resource and its
# attributes according to the schema. For example, a particular Compute Engine
# VM instance could be represented by the following object, because the
# MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
# zone":
# ` "type": "gce_instance",
# "labels": ` "instance_id": "12345678901234",
# "zone": "us-central1-a" ``
# Corresponds to the JSON property `resource`
# @return [Google::Apis::MonitoringV3::MonitoredResource]
attr_accessor :resource
# The metric kind of the time series. When listing time series, this metric kind
# might be different from the metric kind of the associated metric if this time
# series is an alignment or reduction of other time series.When creating a time
@ -214,17 +171,33 @@ module Google
# @return [String]
attr_accessor :value_type
# An object representing a resource that can be used for monitoring, logging,
# billing, or other purposes. Examples include virtual machine instances,
# databases, and storage devices such as disks. The type field identifies a
# MonitoredResourceDescriptor object that describes the resource's schema.
# Information in the labels field identifies the actual resource and its
# attributes according to the schema. For example, a particular Compute Engine
# VM instance could be represented by the following object, because the
# MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
# zone":
# ` "type": "gce_instance",
# "labels": ` "instance_id": "12345678901234",
# "zone": "us-central1-a" ``
# Corresponds to the JSON property `resource`
# @return [Google::Apis::MonitoringV3::MonitoredResource]
attr_accessor :resource
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource = args[:resource] if args.key?(:resource)
@metric_kind = args[:metric_kind] if args.key?(:metric_kind)
@metric = args[:metric] if args.key?(:metric)
@points = args[:points] if args.key?(:points)
@value_type = args[:value_type] if args.key?(:value_type)
@resource = args[:resource] if args.key?(:resource)
end
end
@ -265,22 +238,32 @@ module Google
class Distribution
include Google::Apis::Core::Hashable
# The sum of squared deviations from the mean of the values in the population.
# For values x_i this is:
# Sum[i=1..n]((x_i - mean)^2)
# Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
# describes Welford's method for accumulating this sum in one pass.If count is
# zero then this field must be zero.
# Corresponds to the JSON property `sumOfSquaredDeviation`
# @return [Float]
attr_accessor :sum_of_squared_deviation
# The range of the population values.
# Corresponds to the JSON property `range`
# @return [Google::Apis::MonitoringV3::Range]
attr_accessor :range
# The number of values in the population. Must be non-negative.
# Corresponds to the JSON property `count`
# @return [String]
attr_accessor :count
# The arithmetic mean of the values in the population. If count is zero then
# this field must be zero.
# Corresponds to the JSON property `mean`
# @return [Float]
attr_accessor :mean
# The number of values in the population. Must be non-negative.
# Corresponds to the JSON property `count`
# @return [String]
attr_accessor :count
# If bucket_options is given, then the sum of the values in bucket_counts must
# equal the value in count. If bucket_options is not given, no bucket_counts
# fields may be given.Bucket counts are given in order under the numbering
@ -313,28 +296,18 @@ module Google
# @return [Google::Apis::MonitoringV3::BucketOptions]
attr_accessor :bucket_options
# The sum of squared deviations from the mean of the values in the population.
# For values x_i this is:
# Sum[i=1..n]((x_i - mean)^2)
# Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
# describes Welford's method for accumulating this sum in one pass.If count is
# zero then this field must be zero.
# Corresponds to the JSON property `sumOfSquaredDeviation`
# @return [Float]
attr_accessor :sum_of_squared_deviation
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation)
@range = args[:range] if args.key?(:range)
@mean = args[:mean] if args.key?(:mean)
@count = args[:count] if args.key?(:count)
@mean = args[:mean] if args.key?(:mean)
@bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts)
@bucket_options = args[:bucket_options] if args.key?(:bucket_options)
@sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation)
end
end
@ -353,13 +326,6 @@ module Google
class MonitoredResource
include Google::Apis::Core::Hashable
# Required. Values for all of the labels listed in the associated monitored
# resource descriptor. For example, Cloud SQL databases use the labels "
# database_id" and "zone".
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Required. The monitored resource type. This field must match the type field of
# a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL
# database is "cloudsql_database".
@ -367,14 +333,21 @@ module Google
# @return [String]
attr_accessor :type
# Required. Values for all of the labels listed in the associated monitored
# resource descriptor. For example, Cloud SQL databases use the labels "
# database_id" and "zone".
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@labels = args[:labels] if args.key?(:labels)
@type = args[:type] if args.key?(:type)
@labels = args[:labels] if args.key?(:labels)
end
end
@ -416,13 +389,6 @@ module Google
class MonitoredResourceDescriptor
include Google::Apis::Core::Hashable
# Required. The monitored resource type. For example, the type "
# cloudsql_database" represents databases in Google Cloud SQL. The maximum
# length of this value is 256 characters.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# Required. A set of labels used to describe instances of this monitored
# resource type. For example, an individual Google Cloud SQL database is
# identified by values for the labels "database_id" and "zone".
@ -453,17 +419,24 @@ module Google
# @return [String]
attr_accessor :description
# Required. The monitored resource type. For example, the type "
# cloudsql_database" represents databases in Google Cloud SQL. The maximum
# length of this value is 256 characters.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
@display_name = args[:display_name] if args.key?(:display_name)
@description = args[:description] if args.key?(:description)
@type = args[:type] if args.key?(:type)
end
end
@ -594,11 +567,6 @@ module Google
class Linear
include Google::Apis::Core::Hashable
# Must be greater than 0.
# Corresponds to the JSON property `width`
# @return [Float]
attr_accessor :width
# Lower bound of the first bucket.
# Corresponds to the JSON property `offset`
# @return [Float]
@ -609,15 +577,20 @@ module Google
# @return [Fixnum]
attr_accessor :num_finite_buckets
# Must be greater than 0.
# Corresponds to the JSON property `width`
# @return [Float]
attr_accessor :width
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@width = args[:width] if args.key?(:width)
@offset = args[:offset] if args.key?(:offset)
@num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
@width = args[:width] if args.key?(:width)
end
end
@ -626,14 +599,6 @@ module Google
class Option
include Google::Apis::Core::Hashable
# The option's value packed in an Any message. If the value is a primitive, the
# corresponding wrapper type defined in google/protobuf/wrappers.proto should be
# used. If the value is an enum, it should be stored as an int32 value using the
# google.protobuf.Int32Value type.
# Corresponds to the JSON property `value`
# @return [Hash<String,Object>]
attr_accessor :value
# The option's name. For protobuf built-in options (options defined in
# descriptor.proto), this is the short name. For example, "map_entry". For
# custom options, it should be the fully-qualified name. For example, "google.
@ -642,14 +607,22 @@ module Google
# @return [String]
attr_accessor :name
# The option's value packed in an Any message. If the value is a primitive, the
# corresponding wrapper type defined in google/protobuf/wrappers.proto should be
# used. If the value is an enum, it should be stored as an int32 value using the
# google.protobuf.Int32Value type.
# Corresponds to the JSON property `value`
# @return [Hash<String,Object>]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@value = args[:value] if args.key?(:value)
@name = args[:name] if args.key?(:name)
@value = args[:value] if args.key?(:value)
end
end
@ -672,6 +645,29 @@ module Google
end
end
# A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets
# with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower
# bound (1 <= i < N); boundsi - 1There must be at least one element in bounds.
# If bounds has only one element, there are no finite buckets, and that single
# element is the common boundary of the overflow and underflow buckets.
class Explicit
include Google::Apis::Core::Hashable
# The values must be monotonically increasing.
# Corresponds to the JSON property `bounds`
# @return [Array<Float>]
attr_accessor :bounds
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bounds = args[:bounds] if args.key?(:bounds)
end
end
# A time interval extending just after a start time through an end time. If the
# start time is the same as the end time, then the interval represents a single
# point in time.
@ -700,29 +696,6 @@ module Google
end
end
# A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets
# with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower
# bound (1 <= i < N); boundsi - 1There must be at least one element in bounds.
# If bounds has only one element, there are no finite buckets, and that single
# element is the common boundary of the overflow and underflow buckets.
class Explicit
include Google::Apis::Core::Hashable
# The values must be monotonically increasing.
# Corresponds to the JSON property `bounds`
# @return [Array<Float>]
attr_accessor :bounds
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bounds = args[:bounds] if args.key?(:bounds)
end
end
# Specify a sequence of buckets that have a width that is proportional to the
# value of the lower bound. Each bucket represents a constant relative
# uncertainty on a specific value in the bucket.Defines num_finite_buckets + 2 (=
@ -732,6 +705,11 @@ module Google
class Exponential
include Google::Apis::Core::Hashable
# Must be greater than 1.
# Corresponds to the JSON property `growthFactor`
# @return [Float]
attr_accessor :growth_factor
# Must be greater than 0.
# Corresponds to the JSON property `scale`
# @return [Float]
@ -742,20 +720,15 @@ module Google
# @return [Fixnum]
attr_accessor :num_finite_buckets
# Must be greater than 1.
# Corresponds to the JSON property `growthFactor`
# @return [Float]
attr_accessor :growth_factor
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@growth_factor = args[:growth_factor] if args.key?(:growth_factor)
@scale = args[:scale] if args.key?(:scale)
@num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
@growth_factor = args[:growth_factor] if args.key?(:growth_factor)
end
end
@ -763,6 +736,11 @@ module Google
class Point
include Google::Apis::Core::Hashable
# A single strongly-typed value.
# Corresponds to the JSON property `value`
# @return [Google::Apis::MonitoringV3::TypedValue]
attr_accessor :value
# A time interval extending just after a start time through an end time. If the
# start time is the same as the end time, then the interval represents a single
# point in time.
@ -770,19 +748,14 @@ module Google
# @return [Google::Apis::MonitoringV3::TimeInterval]
attr_accessor :interval
# A single strongly-typed value.
# Corresponds to the JSON property `value`
# @return [Google::Apis::MonitoringV3::TypedValue]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@interval = args[:interval] if args.key?(:interval)
@value = args[:value] if args.key?(:value)
@interval = args[:interval] if args.key?(:interval)
end
end
@ -801,16 +774,16 @@ module Google
# @return [Fixnum]
attr_accessor :number
# The field type.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The field JSON name.
# Corresponds to the JSON property `jsonName`
# @return [String]
attr_accessor :json_name
# The field type.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The protocol buffer options.
# Corresponds to the JSON property `options`
# @return [Array<Google::Apis::MonitoringV3::Option>]
@ -822,17 +795,17 @@ module Google
# @return [Fixnum]
attr_accessor :oneof_index
# The field cardinality.
# Corresponds to the JSON property `cardinality`
# @return [String]
attr_accessor :cardinality
# Whether to use alternative packed wire representation.
# Corresponds to the JSON property `packed`
# @return [Boolean]
attr_accessor :packed
alias_method :packed?, :packed
# The field cardinality.
# Corresponds to the JSON property `cardinality`
# @return [String]
attr_accessor :cardinality
# The string value of the default value of this field. Proto2 syntax only.
# Corresponds to the JSON property `defaultValue`
# @return [String]
@ -851,12 +824,12 @@ module Google
def update!(**args)
@type_url = args[:type_url] if args.key?(:type_url)
@number = args[:number] if args.key?(:number)
@kind = args[:kind] if args.key?(:kind)
@json_name = args[:json_name] if args.key?(:json_name)
@kind = args[:kind] if args.key?(:kind)
@options = args[:options] if args.key?(:options)
@oneof_index = args[:oneof_index] if args.key?(:oneof_index)
@packed = args[:packed] if args.key?(:packed)
@cardinality = args[:cardinality] if args.key?(:cardinality)
@packed = args[:packed] if args.key?(:packed)
@default_value = args[:default_value] if args.key?(:default_value)
@name = args[:name] if args.key?(:name)
end
@ -948,56 +921,6 @@ module Google
end
end
# A protocol buffer message type.
class Type
include Google::Apis::Core::Hashable
# The protocol buffer options.
# Corresponds to the JSON property `options`
# @return [Array<Google::Apis::MonitoringV3::Option>]
attr_accessor :options
# The list of fields.
# Corresponds to the JSON property `fields`
# @return [Array<Google::Apis::MonitoringV3::Field>]
attr_accessor :fields
# The fully qualified message name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The list of types appearing in oneof definitions in this type.
# Corresponds to the JSON property `oneofs`
# @return [Array<String>]
attr_accessor :oneofs
# The source syntax.
# Corresponds to the JSON property `syntax`
# @return [String]
attr_accessor :syntax
# SourceContext represents information about the source of a protobuf element,
# like the file in which it is defined.
# Corresponds to the JSON property `sourceContext`
# @return [Google::Apis::MonitoringV3::SourceContext]
attr_accessor :source_context
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@options = args[:options] if args.key?(:options)
@fields = args[:fields] if args.key?(:fields)
@name = args[:name] if args.key?(:name)
@oneofs = args[:oneofs] if args.key?(:oneofs)
@syntax = args[:syntax] if args.key?(:syntax)
@source_context = args[:source_context] if args.key?(:source_context)
end
end
# The description of a dynamic collection of monitored resources. Each group has
# a filter that is matched against monitored resources and their associated
# metadata. If a group's filter matches an available monitored resource, then
@ -1021,21 +944,6 @@ module Google
class Group
include Google::Apis::Core::Hashable
# Output only. The name of this group. The format is "projects/`
# project_id_or_number`/groups/`group_id`". When creating a group, this field is
# ignored and a new name is created consisting of the project specified in the
# call to CreateGroup and a unique `group_id` that is generated automatically.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The name of the group's parent, if it has one. The format is "projects/`
# project_id_or_number`/groups/`group_id`". For groups with no parent,
# parentName is the empty string, "".
# Corresponds to the JSON property `parentName`
# @return [String]
attr_accessor :parent_name
# A user-assigned name for this group, used only for display purposes.
# Corresponds to the JSON property `displayName`
# @return [String]
@ -1053,17 +961,82 @@ module Google
# @return [String]
attr_accessor :filter
# Output only. The name of this group. The format is "projects/`
# project_id_or_number`/groups/`group_id`". When creating a group, this field is
# ignored and a new name is created consisting of the project specified in the
# call to CreateGroup and a unique `group_id` that is generated automatically.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The name of the group's parent, if it has one. The format is "projects/`
# project_id_or_number`/groups/`group_id`". For groups with no parent,
# parentName is the empty string, "".
# Corresponds to the JSON property `parentName`
# @return [String]
attr_accessor :parent_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@parent_name = args[:parent_name] if args.key?(:parent_name)
@display_name = args[:display_name] if args.key?(:display_name)
@is_cluster = args[:is_cluster] if args.key?(:is_cluster)
@filter = args[:filter] if args.key?(:filter)
@name = args[:name] if args.key?(:name)
@parent_name = args[:parent_name] if args.key?(:parent_name)
end
end
# A protocol buffer message type.
class Type
include Google::Apis::Core::Hashable
# The source syntax.
# Corresponds to the JSON property `syntax`
# @return [String]
attr_accessor :syntax
# SourceContext represents information about the source of a protobuf element,
# like the file in which it is defined.
# Corresponds to the JSON property `sourceContext`
# @return [Google::Apis::MonitoringV3::SourceContext]
attr_accessor :source_context
# The protocol buffer options.
# Corresponds to the JSON property `options`
# @return [Array<Google::Apis::MonitoringV3::Option>]
attr_accessor :options
# The list of fields.
# Corresponds to the JSON property `fields`
# @return [Array<Google::Apis::MonitoringV3::Field>]
attr_accessor :fields
# The fully qualified message name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The list of types appearing in oneof definitions in this type.
# Corresponds to the JSON property `oneofs`
# @return [Array<String>]
attr_accessor :oneofs
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@syntax = args[:syntax] if args.key?(:syntax)
@source_context = args[:source_context] if args.key?(:source_context)
@options = args[:options] if args.key?(:options)
@fields = args[:fields] if args.key?(:fields)
@name = args[:name] if args.key?(:name)
@oneofs = args[:oneofs] if args.key?(:oneofs)
end
end
@ -1131,6 +1104,12 @@ module Google
class CollectdValue
include Google::Apis::Core::Hashable
# The data source for the collectd value. For example there are two data sources
# for network measurements: "rx" and "tx".
# Corresponds to the JSON property `dataSourceName`
# @return [String]
attr_accessor :data_source_name
# A single strongly-typed value.
# Corresponds to the JSON property `value`
# @return [Google::Apis::MonitoringV3::TypedValue]
@ -1141,11 +1120,28 @@ module Google
# @return [String]
attr_accessor :data_source_type
# The data source for the collectd value. For example there are two data sources
# for network measurements: "rx" and "tx".
# Corresponds to the JSON property `dataSourceName`
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@data_source_name = args[:data_source_name] if args.key?(:data_source_name)
@value = args[:value] if args.key?(:value)
@data_source_type = args[:data_source_type] if args.key?(:data_source_type)
end
end
# SourceContext represents information about the source of a protobuf element,
# like the file in which it is defined.
class SourceContext
include Google::Apis::Core::Hashable
# The path-qualified name of the .proto file that contained the associated
# protobuf element. For example: "google/protobuf/source_context.proto".
# Corresponds to the JSON property `fileName`
# @return [String]
attr_accessor :data_source_name
attr_accessor :file_name
def initialize(**args)
update!(**args)
@ -1153,9 +1149,7 @@ module Google
# Update properties of this object
def update!(**args)
@value = args[:value] if args.key?(:value)
@data_source_type = args[:data_source_type] if args.key?(:data_source_type)
@data_source_name = args[:data_source_name] if args.key?(:data_source_name)
@file_name = args[:file_name] if args.key?(:file_name)
end
end
@ -1165,6 +1159,12 @@ module Google
class MetricDescriptor
include Google::Apis::Core::Hashable
# Whether the metric records instantaneous values, changes to a value, etc. Some
# combinations of metric_kind and value_type might not be supported.
# Corresponds to the JSON property `metricKind`
# @return [String]
attr_accessor :metric_kind
# A concise name for the metric, which can be displayed in user interfaces. Use
# sentence case without an ending period, for example "Request count".
# Corresponds to the JSON property `displayName`
@ -1262,18 +1262,13 @@ module Google
# @return [String]
attr_accessor :value_type
# Whether the metric records instantaneous values, changes to a value, etc. Some
# combinations of metric_kind and value_type might not be supported.
# Corresponds to the JSON property `metricKind`
# @return [String]
attr_accessor :metric_kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metric_kind = args[:metric_kind] if args.key?(:metric_kind)
@display_name = args[:display_name] if args.key?(:display_name)
@description = args[:description] if args.key?(:description)
@unit = args[:unit] if args.key?(:unit)
@ -1281,28 +1276,6 @@ module Google
@name = args[:name] if args.key?(:name)
@type = args[:type] if args.key?(:type)
@value_type = args[:value_type] if args.key?(:value_type)
@metric_kind = args[:metric_kind] if args.key?(:metric_kind)
end
end
# SourceContext represents information about the source of a protobuf element,
# like the file in which it is defined.
class SourceContext
include Google::Apis::Core::Hashable
# The path-qualified name of the .proto file that contained the associated
# protobuf element. For example: "google/protobuf/source_context.proto".
# Corresponds to the JSON property `fileName`
# @return [String]
attr_accessor :file_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@file_name = args[:file_name] if args.key?(:file_name)
end
end
@ -1330,6 +1303,33 @@ module Google
@max = args[:max] if args.key?(:max)
end
end
# The ListGroups response.
class ListGroupsResponse
include Google::Apis::Core::Hashable
# If there are more results than have been returned, then this field is set to a
# non-empty value. To see the additional results, use that value as pageToken in
# the next call to this method.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The groups that match the specified filters.
# Corresponds to the JSON property `group`
# @return [Array<Google::Apis::MonitoringV3::Group>]
attr_accessor :group
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@group = args[:group] if args.key?(:group)
end
end
end
end
end

View File

@ -22,12 +22,6 @@ module Google
module Apis
module MonitoringV3
class ListGroupsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListGroupMembersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -112,13 +106,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class TimeInterval
class Explicit
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Explicit
class TimeInterval
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -160,13 +154,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Type
class Group
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Group
class Type
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -184,13 +178,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class MetricDescriptor
class SourceContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SourceContext
class MetricDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
@ -203,12 +197,9 @@ module Google
end
class ListGroupsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :group, as: 'group', class: Google::Apis::MonitoringV3::Group, decorator: Google::Apis::MonitoringV3::Group::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
include Google::Apis::Core::JsonObjectSupport
end
class ListGroupMembersResponse
@ -224,34 +215,34 @@ module Google
class CreateCollectdTimeSeriesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :collectd_version, as: 'collectdVersion'
property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation
collection :collectd_payloads, as: 'collectdPayloads', class: Google::Apis::MonitoringV3::CollectdPayload, decorator: Google::Apis::MonitoringV3::CollectdPayload::Representation
property :collectd_version, as: 'collectdVersion'
end
end
class ListMonitoredResourceDescriptorsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::MonitoringV3::MonitoredResourceDescriptor, decorator: Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class TimeSeries
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation
property :metric_kind, as: 'metricKind'
property :metric, as: 'metric', class: Google::Apis::MonitoringV3::Metric, decorator: Google::Apis::MonitoringV3::Metric::Representation
collection :points, as: 'points', class: Google::Apis::MonitoringV3::Point, decorator: Google::Apis::MonitoringV3::Point::Representation
property :value_type, as: 'valueType'
property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation
end
end
@ -266,22 +257,22 @@ module Google
class Distribution
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :sum_of_squared_deviation, as: 'sumOfSquaredDeviation'
property :range, as: 'range', class: Google::Apis::MonitoringV3::Range, decorator: Google::Apis::MonitoringV3::Range::Representation
property :mean, as: 'mean'
property :count, as: 'count'
property :mean, as: 'mean'
collection :bucket_counts, as: 'bucketCounts'
property :bucket_options, as: 'bucketOptions', class: Google::Apis::MonitoringV3::BucketOptions, decorator: Google::Apis::MonitoringV3::BucketOptions::Representation
property :sum_of_squared_deviation, as: 'sumOfSquaredDeviation'
end
end
class MonitoredResource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :labels, as: 'labels'
property :type, as: 'type'
hash :labels, as: 'labels'
end
end
@ -297,12 +288,12 @@ module Google
class MonitoredResourceDescriptor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation
property :name, as: 'name'
property :display_name, as: 'displayName'
property :description, as: 'description'
property :type, as: 'type'
end
end
@ -337,17 +328,17 @@ module Google
class Linear
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :width, as: 'width'
property :offset, as: 'offset'
property :num_finite_buckets, as: 'numFiniteBuckets'
property :width, as: 'width'
end
end
class Option
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :value, as: 'value'
property :name, as: 'name'
hash :value, as: 'value'
end
end
@ -357,6 +348,13 @@ module Google
end
end
class Explicit
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :bounds, as: 'bounds'
end
end
class TimeInterval
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -365,29 +363,22 @@ module Google
end
end
class Explicit
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :bounds, as: 'bounds'
end
end
class Exponential
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :growth_factor, as: 'growthFactor'
property :scale, as: 'scale'
property :num_finite_buckets, as: 'numFiniteBuckets'
property :growth_factor, as: 'growthFactor'
end
end
class Point
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :interval, as: 'interval', class: Google::Apis::MonitoringV3::TimeInterval, decorator: Google::Apis::MonitoringV3::TimeInterval::Representation
property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation
property :interval, as: 'interval', class: Google::Apis::MonitoringV3::TimeInterval, decorator: Google::Apis::MonitoringV3::TimeInterval::Representation
end
end
@ -396,13 +387,13 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
property :type_url, as: 'typeUrl'
property :number, as: 'number'
property :kind, as: 'kind'
property :json_name, as: 'jsonName'
property :kind, as: 'kind'
collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation
property :oneof_index, as: 'oneofIndex'
property :packed, as: 'packed'
property :cardinality, as: 'cardinality'
property :packed, as: 'packed'
property :default_value, as: 'defaultValue'
property :name, as: 'name'
end
@ -434,29 +425,29 @@ module Google
end
end
class Group
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :is_cluster, as: 'isCluster'
property :filter, as: 'filter'
property :name, as: 'name'
property :parent_name, as: 'parentName'
end
end
class Type
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :syntax, as: 'syntax'
property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation
collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation
collection :fields, as: 'fields', class: Google::Apis::MonitoringV3::Field, decorator: Google::Apis::MonitoringV3::Field::Representation
property :name, as: 'name'
collection :oneofs, as: 'oneofs'
property :syntax, as: 'syntax'
property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation
end
end
class Group
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :parent_name, as: 'parentName'
property :display_name, as: 'displayName'
property :is_cluster, as: 'isCluster'
property :filter, as: 'filter'
end
end
@ -475,25 +466,10 @@ module Google
class CollectdValue
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :data_source_name, as: 'dataSourceName'
property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation
property :data_source_type, as: 'dataSourceType'
property :data_source_name, as: 'dataSourceName'
end
end
class MetricDescriptor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :description, as: 'description'
property :unit, as: 'unit'
collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation
property :name, as: 'name'
property :type, as: 'type'
property :value_type, as: 'valueType'
property :metric_kind, as: 'metricKind'
end
end
@ -504,6 +480,21 @@ module Google
end
end
class MetricDescriptor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric_kind, as: 'metricKind'
property :display_name, as: 'displayName'
property :description, as: 'description'
property :unit, as: 'unit'
collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation
property :name, as: 'name'
property :type, as: 'type'
property :value_type, as: 'valueType'
end
end
class Range
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -511,6 +502,15 @@ module Google
property :max, as: 'max'
end
end
class ListGroupsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :group, as: 'group', class: Google::Apis::MonitoringV3::Group, decorator: Google::Apis::MonitoringV3::Group::Representation
end
end
end
end
end

View File

@ -34,16 +34,16 @@ module Google
#
# @see https://cloud.google.com/monitoring/api/
class MonitoringService < 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
# @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
def initialize
super('https://monitoring.googleapis.com/', '')
end
@ -55,11 +55,11 @@ module Google
# The project in which to create the time series. The format is "projects/
# PROJECT_ID_OR_NUMBER".
# @param [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest] create_collectd_time_series_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -72,51 +72,15 @@ 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 create_collectd_time_series(name, create_collectd_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', options)
command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation
command.request_object = create_collectd_time_series_request_object
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::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
# Creates or adds data to one or more time series. The response is empty if all
# time series in the request were written. If any time series could not be
# written, a corresponding failure message is included in the error response.
# @param [String] name
# The project on which to execute the request. The format is "projects/`
# project_id_or_number`".
# @param [Google::Apis::MonitoringV3::CreateTimeSeriesRequest] create_time_series_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::MonitoringV3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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 create_time_series(name, create_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/timeSeries', options)
command.request_representation = Google::Apis::MonitoringV3::CreateTimeSeriesRequest::Representation
command.request_object = create_time_series_request_object
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::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
@ -125,6 +89,15 @@ module Google
# @param [String] name
# The project on which to execute the request. The format is "projects/`
# project_id_or_number`".
# @param [String] interval_end_time
# Required. The end of the time interval.
# @param [String] aggregation_alignment_period
# The alignment period for per-time series alignment. If present,
# alignmentPeriod must be at least 60 seconds. After per-time series alignment,
# each time series will contain data points only on the period boundaries. If
# perSeriesAligner is not specified or equals ALIGN_NONE, then this field is
# ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then
# this field must be defined; otherwise an error is returned.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return. When view
# field sets to FULL, it limits the number of Points server will return; if view
@ -146,10 +119,6 @@ module Google
# labels and other information. For example:
# metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
# metric.label.instance_name = "my-instance-name"
# @param [String] page_token
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
# to return additional results from the previous method call.
# @param [String] aggregation_per_series_aligner
# The approach to be used to align individual time series. Not all alignment
# functions may be applied to all time series, depending on the metric type and
@ -158,6 +127,10 @@ module Google
# to perform cross-time series reduction. If crossSeriesReducer is specified,
# then perSeriesAligner must be specified and not equal ALIGN_NONE and
# alignmentPeriod must be specified; otherwise, an error is returned.
# @param [String] page_token
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
# to return additional results from the previous method call.
# @param [String] interval_start_time
# Optional. The beginning of the time interval. The default value for the start
# time is the end time. The start time must not be later than the end time.
@ -175,20 +148,11 @@ module Google
# specified and all the time series have the same resource type, then the time
# series are aggregated into a single output time series. If crossSeriesReducer
# is not defined, this field is ignored.
# @param [String] interval_end_time
# Required. The end of the time interval.
# @param [String] aggregation_alignment_period
# The alignment period for per-time series alignment. If present,
# alignmentPeriod must be at least 60 seconds. After per-time series alignment,
# each time series will contain data points only on the period boundaries. If
# perSeriesAligner is not specified or equals ALIGN_NONE, then this field is
# ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then
# this field must be defined; otherwise an error is returned.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -201,37 +165,39 @@ 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 list_project_time_series(name, page_size: nil, order_by: nil, aggregation_cross_series_reducer: nil, filter: nil, page_token: nil, aggregation_per_series_aligner: nil, interval_start_time: nil, view: nil, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_time_series(name, interval_end_time: nil, aggregation_alignment_period: nil, page_size: nil, order_by: nil, aggregation_cross_series_reducer: nil, filter: nil, aggregation_per_series_aligner: nil, page_token: nil, interval_start_time: nil, view: nil, aggregation_group_by_fields: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/timeSeries', options)
command.response_representation = Google::Apis::MonitoringV3::ListTimeSeriesResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListTimeSeriesResponse
command.params['name'] = name unless name.nil?
command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['orderBy'] = order_by unless order_by.nil?
command.query['aggregation.crossSeriesReducer'] = aggregation_cross_series_reducer unless aggregation_cross_series_reducer.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil?
command.query['view'] = view unless view.nil?
command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil?
command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes a metric descriptor. Only user-created custom metrics can be deleted.
# Creates or adds data to one or more time series. The response is empty if all
# time series in the request were written. If any time series could not be
# written, a corresponding failure message is included in the error response.
# @param [String] name
# The metric descriptor on which to execute the request. The format is "projects/
# `project_id_or_number`/metricDescriptors/`metric_id`". An example of `
# metric_id` is: "custom.googleapis.com/my_test_metric".
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# The project on which to execute the request. The format is "projects/`
# project_id_or_number`".
# @param [Google::Apis::MonitoringV3::CreateTimeSeriesRequest] create_time_series_request_object
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -244,13 +210,15 @@ 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 delete_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v3/{+name}', options)
def create_time_series(name, create_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/timeSeries', options)
command.request_representation = Google::Apis::MonitoringV3::CreateTimeSeriesRequest::Representation
command.request_object = create_time_series_request_object
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -270,11 +238,11 @@ module Google
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
# to return additional results from the previous method call.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -287,7 +255,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 list_project_metric_descriptors(name, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_metric_descriptors(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options)
command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse
@ -295,8 +263,8 @@ module Google
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.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['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -306,11 +274,11 @@ module Google
# The metric descriptor on which to execute the request. The format is "projects/
# `project_id_or_number`/metricDescriptors/`metric_id`". An example value of `
# metric_id` is "compute.googleapis.com/instance/disk/read_bytes_count".
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -323,13 +291,13 @@ 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 get_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block)
def get_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
command.response_class = Google::Apis::MonitoringV3::MetricDescriptor
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -339,11 +307,11 @@ module Google
# The project on which to execute the request. The format is "projects/`
# project_id_or_number`".
# @param [Google::Apis::MonitoringV3::MetricDescriptor] metric_descriptor_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -356,106 +324,28 @@ 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 create_project_metric_descriptor(name, metric_descriptor_object = nil, fields: nil, quota_user: nil, options: nil, &block)
def create_project_metric_descriptor(name, metric_descriptor_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/metricDescriptors', options)
command.request_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
command.request_object = metric_descriptor_object
command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
command.response_class = Google::Apis::MonitoringV3::MetricDescriptor
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists monitored resource descriptors that match a filter. This method does not
# require a Stackdriver account.
# Deletes a metric descriptor. Only user-created custom metrics can be deleted.
# @param [String] name
# The project on which to execute the request. The format is "projects/`
# project_id_or_number`".
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# @param [String] filter
# An optional filter describing the descriptors to be returned. The filter can
# reference the descriptor's type and labels. For example, the following filter
# returns only Google Compute Engine descriptors that have an id label:
# resource.type = starts_with("gce_") AND resource.label:id
# @param [String] page_token
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
# to return additional results from the previous method call.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# The metric descriptor on which to execute the request. The format is "projects/
# `project_id_or_number`/metricDescriptors/`metric_id`". An example of `
# metric_id` is: "custom.googleapis.com/my_test_metric".
# @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::MonitoringV3::ListMonitoredResourceDescriptorsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse]
#
# @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_monitored_resource_descriptors(name, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options)
command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse
command.params['name'] = name unless name.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets a single monitored resource descriptor. This method does not require a
# Stackdriver account.
# @param [String] name
# The monitored resource descriptor to get. The format is "projects/`
# project_id_or_number`/monitoredResourceDescriptors/`resource_type`". The `
# resource_type` is a predefined type, such as cloudsql_database.
# @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::MonitoringV3::MonitoredResourceDescriptor] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::MonitoredResourceDescriptor]
#
# @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_monitored_resource_descriptor(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation
command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes an existing group.
# @param [String] name
# The group to delete. The format is "projects/`project_id_or_number`/groups/`
# group_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
#
@ -468,13 +358,123 @@ 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 delete_project_group(name, fields: nil, quota_user: nil, options: nil, &block)
def delete_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists monitored resource descriptors that match a filter. This method does not
# require a Stackdriver account.
# @param [String] name
# The project on which to execute the request. The format is "projects/`
# project_id_or_number`".
# @param [String] filter
# An optional filter describing the descriptors to be returned. The filter can
# reference the descriptor's type and labels. For example, the following filter
# returns only Google Compute Engine descriptors that have an id label:
# resource.type = starts_with("gce_") AND resource.label:id
# @param [String] page_token
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
# to return additional results from the previous method call.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse]
#
# @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_monitored_resource_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options)
command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets a single monitored resource descriptor. This method does not require a
# Stackdriver account.
# @param [String] name
# The monitored resource descriptor to get. The format is "projects/`
# project_id_or_number`/monitoredResourceDescriptors/`resource_type`". The `
# resource_type` is a predefined type, such as cloudsql_database.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::MonitoredResourceDescriptor]
#
# @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_monitored_resource_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation
command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes an existing group.
# @param [String] name
# The group to delete. The format is "projects/`project_id_or_number`/groups/`
# group_id`".
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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_group(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::Empty
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -482,6 +482,10 @@ module Google
# @param [String] name
# The project whose groups are to be listed. The format is "projects/`
# project_id_or_number`".
# @param [String] page_token
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
# to return additional results from the previous method call.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# @param [String] ancestors_of_group
@ -498,15 +502,11 @@ module Google
# A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns the
# descendants of the specified group. This is a superset of the results returned
# by the childrenOfGroup filter, and includes children-of-children, and so forth.
# @param [String] page_token
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
# to return additional results from the previous method call.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -519,18 +519,18 @@ 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 list_project_groups(name, page_size: nil, ancestors_of_group: nil, children_of_group: nil, descendants_of_group: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_groups(name, page_token: nil, page_size: nil, ancestors_of_group: nil, children_of_group: nil, descendants_of_group: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/groups', options)
command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse
command.params['name'] = name unless name.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil?
command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil?
command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.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['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -538,11 +538,11 @@ module Google
# @param [String] name
# The group to retrieve. The format is "projects/`project_id_or_number`/groups/`
# group_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -555,13 +555,13 @@ 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 get_project_group(name, fields: nil, quota_user: nil, options: nil, &block)
def get_project_group(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::Group::Representation
command.response_class = Google::Apis::MonitoringV3::Group
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -574,11 +574,11 @@ module Google
# @param [Google::Apis::MonitoringV3::Group] group_object
# @param [Boolean] validate_only
# If true, validate this request but do not update the existing group.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -591,7 +591,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 update_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
def update_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v3/{+name}', options)
command.request_representation = Google::Apis::MonitoringV3::Group::Representation
command.request_object = group_object
@ -599,8 +599,8 @@ module Google
command.response_class = Google::Apis::MonitoringV3::Group
command.params['name'] = name unless name.nil?
command.query['validateOnly'] = validate_only unless validate_only.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -611,11 +611,11 @@ module Google
# @param [Google::Apis::MonitoringV3::Group] group_object
# @param [Boolean] validate_only
# If true, validate this request but do not create the group.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -628,7 +628,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 create_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
def create_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/groups', options)
command.request_representation = Google::Apis::MonitoringV3::Group::Representation
command.request_object = group_object
@ -636,8 +636,8 @@ module Google
command.response_class = Google::Apis::MonitoringV3::Group
command.params['name'] = name unless name.nil?
command.query['validateOnly'] = validate_only unless validate_only.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@ -645,6 +645,14 @@ module Google
# @param [String] name
# The group whose members are listed. The format is "projects/`
# project_id_or_number`/groups/`group_id`".
# @param [String] interval_end_time
# Required. The end of the time interval.
# @param [String] filter
# An optional list filter describing the members to be returned. The filter may
# reference the type, labels, and metadata of monitored resources that comprise
# the group. For example, to return only resources representing Compute Engine
# VM instances, use this filter:
# resource.type = "gce_instance"
# @param [String] page_token
# If this field is not empty then it must contain the nextPageToken value
# returned by a previous call to this method. Using this field causes the method
@ -654,19 +662,11 @@ module Google
# time is the end time. The start time must not be later than the end time.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# @param [String] interval_end_time
# Required. The end of the time interval.
# @param [String] filter
# An optional list filter describing the members to be returned. The filter may
# reference the type, labels, and metadata of monitored resources that comprise
# the group. For example, to return only resources representing Compute Engine
# VM instances, use this filter:
# resource.type = "gce_instance"
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -679,26 +679,26 @@ 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 list_project_group_members(name, page_token: nil, interval_start_time: nil, page_size: nil, interval_end_time: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
def list_project_group_members(name, interval_end_time: nil, filter: nil, page_token: nil, interval_start_time: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/members', options)
command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse
command.params['name'] = name unless name.nil?
command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.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?
command.query['key'] = key unless key.nil?
end
end
end

View File

@ -20,40 +20,39 @@ module Google
module Apis
# Google People API
#
# The Google People API service gives access to information about profiles and
# contacts.
# Provides access to information about profiles and contacts.
#
# @see https://developers.google.com/people/
module PeopleV1
VERSION = 'V1'
REVISION = '20160210'
REVISION = '20170213'
# Manage your contacts
AUTH_CONTACTS = 'https://www.googleapis.com/auth/contacts'
# View your contacts
AUTH_CONTACTS_READONLY = 'https://www.googleapis.com/auth/contacts.readonly'
# Know your basic profile info and list of people in your circles.
# Know the list of people in your circles, your age range, and language
AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login'
# View your basic profile info
AUTH_USERINFO_PROFILE = 'https://www.googleapis.com/auth/userinfo.profile'
# View your street addresses
AUTH_USER_ADDRESSES_READ = 'https://www.googleapis.com/auth/user.addresses.read'
# View your complete date of birth
AUTH_USER_BIRTHDAY_READ = 'https://www.googleapis.com/auth/user.birthday.read'
# Manage your contacts
AUTH_CONTACTS = 'https://www.googleapis.com/auth/contacts'
# View your email addresses
AUTH_USER_EMAILS_READ = 'https://www.googleapis.com/auth/user.emails.read'
# View your phone numbers
AUTH_USER_PHONENUMBERS_READ = 'https://www.googleapis.com/auth/user.phonenumbers.read'
# View your email address
AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
# View your basic profile info
AUTH_USERINFO_PROFILE = 'https://www.googleapis.com/auth/userinfo.profile'
# View your phone numbers
AUTH_USER_PHONENUMBERS_READ = 'https://www.googleapis.com/auth/user.phonenumbers.read'
# View your contacts
AUTH_CONTACTS_READONLY = 'https://www.googleapis.com/auth/contacts.readonly'
# View your complete date of birth
AUTH_USER_BIRTHDAY_READ = 'https://www.googleapis.com/auth/user.birthday.read'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -22,8 +22,7 @@ module Google
module PeopleV1
# Google People API
#
# The Google People API service gives access to information about profiles and
# contacts.
# Provides access to information about profiles and contacts.
#
# @example
# require 'google/apis/people_v1'
@ -47,23 +46,26 @@ module Google
super('https://people.googleapis.com/', '')
end
# Provides information about a person resource for a resource name. Use `people/
# me` to indicate the authenticated user.
# Provides information about a person resource for a resource name. Use
# `people/me` to indicate the authenticated user.
# @param [String] resource_name
# The resource name of the person to provide information about. - To get
# information about the authenticated user, specify `people/me`. - To get
# information about any user, specify the resource name that identifies the user,
# such as the resource names returned by [`people.connections.list`](/people/
# api/rest/v1/people.connections/list).
# The resource name of the person to provide information about.
# - To get information about the authenticated user, specify `people/me`.
# - To get information about any user, specify the resource name that
# identifies the user, such as the resource names returned by
# [`people.connections.list`](/people/api/rest/v1/people.connections/list).
# @param [String] request_mask_include_field
# Comma-separated list of fields to be included in the response. Omitting this
# field will include all fields. Each path should start with `person.`: for
# example, `person.names` or `person.photos`.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Comma-separated list of fields to be included in the response. Omitting
# this field will include all fields except for connections.list requests,
# which have a default mask that includes common fields like metadata, name,
# photo, and profile url.
# Each path should start with `person.`: for example, `person.names` or
# `person.photos`.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -76,33 +78,37 @@ 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 get_person(resource_name, request_mask_include_field: nil, fields: nil, quota_user: nil, options: nil, &block)
def get_person(resource_name, request_mask_include_field: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+resourceName}', options)
command.response_representation = Google::Apis::PeopleV1::Person::Representation
command.response_class = Google::Apis::PeopleV1::Person
command.params['resourceName'] = resource_name unless resource_name.nil?
command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Provides information about a list of specific people by specifying a list of
# requested resource names. Use `people/me` to indicate the authenticated user.
# @param [Array<String>, String] resource_names
# The resource name, such as one returned by [`people.connections.list`](/people/
# api/rest/v1/people.connections/list), of one of the people to provide
# information about. You can include this parameter up to 50 times in one
# request.
# Provides information about a list of specific people by specifying a list
# of requested resource names. Use `people/me` to indicate the authenticated
# user.
# @param [String] request_mask_include_field
# Comma-separated list of fields to be included in the response. Omitting this
# field will include all fields. Each path should start with `person.`: for
# example, `person.names` or `person.photos`.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Comma-separated list of fields to be included in the response. Omitting
# this field will include all fields except for connections.list requests,
# which have a default mask that includes common fields like metadata, name,
# photo, and profile url.
# Each path should start with `person.`: for example, `person.names` or
# `person.photos`.
# @param [Array<String>, String] resource_names
# The resource name, such as one returned by
# [`people.connections.list`](/people/api/rest/v1/people.connections/list),
# of one of the people to provide information about. You can include this
# parameter up to 50 times in one request.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -115,41 +121,42 @@ 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 get_people(resource_names: nil, request_mask_include_field: nil, fields: nil, quota_user: nil, options: nil, &block)
def get_people(request_mask_include_field: nil, resource_names: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/people:batchGet', options)
command.response_representation = Google::Apis::PeopleV1::GetPeopleResponse::Representation
command.response_class = Google::Apis::PeopleV1::GetPeopleResponse
command.query['resourceNames'] = resource_names unless resource_names.nil?
command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil?
command.query['fields'] = fields unless fields.nil?
command.query['resourceNames'] = resource_names unless resource_names.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Provides a list of the authenticated user's contacts merged with any linked
# profiles.
# @param [String] resource_name
# The resource name to return connections for. Only `people/me` is valid.
# Provides a list of the authenticated user's contacts merged with any
# linked profiles.
# @param [String] page_token
# The token of the page to be returned.
# @param [Fixnum] page_size
# The number of connections to include in the response. Valid values are between
# 1 and 500, inclusive. Defaults to 100.
# @param [String] sort_order
# The order in which the connections should be sorted. Defaults to `
# LAST_MODIFIED_ASCENDING`.
# @param [String] sync_token
# A sync token, returned by a previous call to `people.connections.list`. Only
# resources changed since the sync token was created are returned.
# The number of connections to include in the response. Valid values are
# between 1 and 500, inclusive. Defaults to 100.
# @param [String] request_mask_include_field
# Comma-separated list of fields to be included in the response. Omitting this
# field will include all fields. Each path should start with `person.`: for
# example, `person.names` or `person.photos`.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# Comma-separated list of fields to be included in the response. Omitting
# this field will include all fields except for connections.list requests,
# which have a default mask that includes common fields like metadata, name,
# photo, and profile url.
# Each path should start with `person.`: for example, `person.names` or
# `person.photos`.
# @param [String] sort_order
# The order in which the connections should be sorted. Defaults to
# `LAST_MODIFIED_ASCENDING`.
# @param [String] sync_token
# A sync token, returned by a previous call to `people.connections.list`.
# Only resources changed since the sync token was created will be returned.
# @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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@ -162,18 +169,17 @@ 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 list_person_connections(resource_name, page_token: nil, page_size: nil, sort_order: nil, sync_token: nil, request_mask_include_field: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+resourceName}/connections', options)
def list_person_me_connections(page_token: nil, page_size: nil, request_mask_include_field: nil, sort_order: nil, sync_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/people/me/connections', options)
command.response_representation = Google::Apis::PeopleV1::ListConnectionsResponse::Representation
command.response_class = Google::Apis::PeopleV1::ListConnectionsResponse
command.params['resourceName'] = resource_name unless resource_name.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil?
command.query['sortOrder'] = sort_order unless sort_order.nil?
command.query['syncToken'] = sync_token unless sync_token.nil?
command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/+/domains/
module PlusDomainsV1
VERSION = 'V1'
REVISION = '20170201'
REVISION = '20170208'
# View your circles and the people and pages in them
AUTH_PLUS_CIRCLES_READ = 'https://www.googleapis.com/auth/plus.circles.read'

Some files were not shown because too many files have changed in this diff Show More