Regen APIs and add cloudkms:v1

This commit is contained in:
Thomas Coffee 2017-03-10 13:11:09 -08:00
parent cf38f15a08
commit 899864d0fe
192 changed files with 120105 additions and 104480 deletions

View File

@ -1,3 +1,7 @@
# 0.10.1
* Regenerate APIs
* Add `cloudkms:v1`
# 0.10.0 # 0.10.0
* Regenerate APIs * Regenerate APIs
* Some exceptions are more descriptive for specific errors * Some exceptions are more descriptive for specific errors

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/ # @see https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/
module Adexchangebuyer2V2beta1 module Adexchangebuyer2V2beta1
VERSION = 'V2beta1' VERSION = 'V2beta1'
REVISION = '20170210' REVISION = '20170308'
# Manage your Ad Exchange buyer account configuration # Manage your Ad Exchange buyer account configuration
AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer' AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'

File diff suppressed because it is too large Load Diff

View File

@ -22,31 +22,25 @@ module Google
module Apis module Apis
module Adexchangebuyer2V2beta1 module Adexchangebuyer2V2beta1
class Client class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ClientUser class WatchCreativeRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ClientUserInvitation class AppContext
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ListClientUsersResponse class NativeContent
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListClientUserInvitationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -58,17 +52,324 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class SecurityContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListCreativesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class HtmlContent
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ServingContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Reason
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class VideoContent
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ClientUserInvitation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AuctionContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListClientUserInvitationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListClientUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LocationContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PlatformContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ClientUser
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CreativeDealAssociation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FilteringStats
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Creative
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RemoveDealAssociationRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Client class Client
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Correction
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AddDealAssociationRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListDealAssociationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Disapproval
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StopWatchingCreativeRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ServingRestriction
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Date
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class WatchCreativeRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :topic, as: 'topic'
end
end
class AppContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :app_types, as: 'appTypes'
end
end
class NativeContent
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :video_url, as: 'videoUrl'
property :logo, as: 'logo', class: Google::Apis::Adexchangebuyer2V2beta1::Image, decorator: Google::Apis::Adexchangebuyer2V2beta1::Image::Representation
property :click_link_url, as: 'clickLinkUrl'
property :price_display_text, as: 'priceDisplayText'
property :click_tracking_url, as: 'clickTrackingUrl'
property :image, as: 'image', class: Google::Apis::Adexchangebuyer2V2beta1::Image, decorator: Google::Apis::Adexchangebuyer2V2beta1::Image::Representation
property :advertiser_name, as: 'advertiserName'
property :store_url, as: 'storeUrl'
property :headline, as: 'headline'
property :app_icon, as: 'appIcon', class: Google::Apis::Adexchangebuyer2V2beta1::Image, decorator: Google::Apis::Adexchangebuyer2V2beta1::Image::Representation
property :call_to_action, as: 'callToAction'
property :body, as: 'body'
property :star_rating, as: 'starRating'
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
class SecurityContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :securities, as: 'securities'
end
end
class ListCreativesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :creatives, as: 'creatives', class: Google::Apis::Adexchangebuyer2V2beta1::Creative, decorator: Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class HtmlContent
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :height, as: 'height'
property :width, as: 'width'
property :snippet, as: 'snippet'
end
end
class ServingContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :app_type, as: 'appType', class: Google::Apis::Adexchangebuyer2V2beta1::AppContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::AppContext::Representation
property :security_type, as: 'securityType', class: Google::Apis::Adexchangebuyer2V2beta1::SecurityContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::SecurityContext::Representation
property :platform, as: 'platform', class: Google::Apis::Adexchangebuyer2V2beta1::PlatformContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::PlatformContext::Representation
property :location, as: 'location', class: Google::Apis::Adexchangebuyer2V2beta1::LocationContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::LocationContext::Representation
property :auction_type, as: 'auctionType', class: Google::Apis::Adexchangebuyer2V2beta1::AuctionContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::AuctionContext::Representation
property :all, as: 'all'
end
end
class Image
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :width, as: 'width'
property :url, as: 'url'
property :height, as: 'height'
end
end
class Reason
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :entity_type, as: 'entityType'
property :client_name, as: 'clientName'
property :role, as: 'role'
property :visible_to_seller, as: 'visibleToSeller'
property :entity_id, as: 'entityId'
property :client_account_id, as: 'clientAccountId'
property :entity_name, as: 'entityName'
property :status, as: 'status' property :status, as: 'status'
property :count, as: 'count'
end
end
class VideoContent
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :video_url, as: 'videoUrl'
end
end
class ClientUserInvitation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :client_account_id, as: 'clientAccountId'
property :invitation_id, as: 'invitationId'
property :email, as: 'email'
end
end
class AuctionContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :auction_types, as: 'auctionTypes'
end
end
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
end
end
class ListClientUsersResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :users, as: 'users', class: Google::Apis::Adexchangebuyer2V2beta1::ClientUser, decorator: Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
end
end
class LocationContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :geo_criteria_ids, as: 'geoCriteriaIds'
end
end
class PlatformContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :platforms, as: 'platforms'
end end
end end
@ -82,39 +383,142 @@ module Google
end end
end end
class ClientUserInvitation class CreativeDealAssociation
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :invitation_id, as: 'invitationId' property :account_id, as: 'accountId'
property :email, as: 'email' property :creative_id, as: 'creativeId'
property :deals_id, as: 'dealsId'
end
end
class FilteringStats
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :reasons, as: 'reasons', class: Google::Apis::Adexchangebuyer2V2beta1::Reason, decorator: Google::Apis::Adexchangebuyer2V2beta1::Reason::Representation
property :date, as: 'date', class: Google::Apis::Adexchangebuyer2V2beta1::Date, decorator: Google::Apis::Adexchangebuyer2V2beta1::Date::Representation
end
end
class Creative
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :video, as: 'video', class: Google::Apis::Adexchangebuyer2V2beta1::VideoContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::VideoContent::Representation
collection :serving_restrictions, as: 'servingRestrictions', class: Google::Apis::Adexchangebuyer2V2beta1::ServingRestriction, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingRestriction::Representation
property :agency_id, as: 'agencyId'
collection :click_through_urls, as: 'clickThroughUrls'
property :ad_choices_destination_url, as: 'adChoicesDestinationUrl'
collection :detected_sensitive_categories, as: 'detectedSensitiveCategories'
collection :restricted_categories, as: 'restrictedCategories'
collection :corrections, as: 'corrections', class: Google::Apis::Adexchangebuyer2V2beta1::Correction, decorator: Google::Apis::Adexchangebuyer2V2beta1::Correction::Representation
property :version, as: 'version'
collection :vendor_ids, as: 'vendorIds'
collection :impression_tracking_urls, as: 'impressionTrackingUrls'
property :html, as: 'html', class: Google::Apis::Adexchangebuyer2V2beta1::HtmlContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::HtmlContent::Representation
property :deals_status, as: 'dealsStatus'
collection :detected_product_categories, as: 'detectedProductCategories'
property :open_auction_status, as: 'openAuctionStatus'
property :advertiser_name, as: 'advertiserName'
collection :detected_domains, as: 'detectedDomains'
collection :detected_advertiser_ids, as: 'detectedAdvertiserIds'
property :filtering_stats, as: 'filteringStats', class: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats, decorator: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats::Representation
collection :attributes, as: 'attributes'
property :api_update_time, as: 'apiUpdateTime'
collection :detected_languages, as: 'detectedLanguages'
property :creative_id, as: 'creativeId'
property :account_id, as: 'accountId'
property :native, as: 'native', class: Google::Apis::Adexchangebuyer2V2beta1::NativeContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::NativeContent::Representation
end
end
class RemoveDealAssociationRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :association, as: 'association', class: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation, decorator: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation::Representation
end
end
class Client
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :client_name, as: 'clientName'
property :role, as: 'role'
property :visible_to_seller, as: 'visibleToSeller'
property :entity_id, as: 'entityId'
property :client_account_id, as: 'clientAccountId' property :client_account_id, as: 'clientAccountId'
property :entity_name, as: 'entityName'
property :status, as: 'status'
property :entity_type, as: 'entityType'
end end
end end
class ListClientUsersResponse class Correction
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
collection :contexts, as: 'contexts', class: Google::Apis::Adexchangebuyer2V2beta1::ServingContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingContext::Representation
collection :details, as: 'details'
end
end
class AddDealAssociationRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :association, as: 'association', class: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation, decorator: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation::Representation
end
end
class ListDealAssociationsResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken' property :next_page_token, as: 'nextPageToken'
collection :users, as: 'users', class: Google::Apis::Adexchangebuyer2V2beta1::ClientUser, decorator: Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation collection :associations, as: 'associations', class: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation, decorator: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation::Representation
end end
end end
class ListClientUserInvitationsResponse class Disapproval
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :invitations, as: 'invitations', class: Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation, decorator: Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation collection :details, as: 'details'
property :reason, as: 'reason'
property :next_page_token, as: 'nextPageToken'
end end
end end
class ListClientsResponse class StopWatchingCreativeRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :clients, as: 'clients', class: Google::Apis::Adexchangebuyer2V2beta1::Client, decorator: Google::Apis::Adexchangebuyer2V2beta1::Client::Representation end
end
property :next_page_token, as: 'nextPageToken' class ServingRestriction
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :disapproval_reasons, as: 'disapprovalReasons', class: Google::Apis::Adexchangebuyer2V2beta1::Disapproval, decorator: Google::Apis::Adexchangebuyer2V2beta1::Disapproval::Representation
collection :contexts, as: 'contexts', class: Google::Apis::Adexchangebuyer2V2beta1::ServingContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingContext::Representation
property :status, as: 'status'
end
end
class Date
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :year, as: 'year'
property :day, as: 'day'
property :month, as: 'month'
end end
end end
end end

View File

@ -47,40 +47,6 @@ module Google
super('https://adexchangebuyer.googleapis.com/', '') super('https://adexchangebuyer.googleapis.com/', '')
end 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] quota_user
# Available to 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 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. # Gets a client buyer with a given client account ID.
# @param [String] account_id # @param [String] account_id
# Numerical account ID of the client's sponsor buyer. (required) # Numerical account ID of the client's sponsor buyer. (required)
@ -192,14 +158,11 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Retrieves an existing client user invitation. # Creates a new client buyer.
# @param [String] account_id # @param [String] account_id
# Numerical account ID of the client's sponsor buyer. (required) # Unique numerical account ID for the buyer of which the client buyer
# @param [String] client_account_id # is a customer; the sponsor buyer to create a client for. (required)
# Numerical account ID of the client buyer that the user invitation # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object
# to be retrieved is associated with. (required)
# @param [String] invitation_id
# Numerical identifier of the user invitation to retrieve. (required)
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # arbitrary string assigned to a user, but should not exceed 40 characters.
@ -209,110 +172,21 @@ module Google
# Request-specific options # Request-specific options
# #
# @yield [result, err] Result & error if block supplied # @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] parsed result object # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object
# @yieldparam err [StandardError] error object if request failed # @yieldparam err [StandardError] error object if request failed
# #
# @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] # @return [Google::Apis::Adexchangebuyer2V2beta1::Client]
# #
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def get_account_client_invitation(account_id, client_account_id, invitation_id, quota_user: nil, fields: 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(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}', options) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation 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.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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists all the client users invitations for a client
# with a given 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 list invitations for.
# (required)
# You must either specify a string representation of a
# numerical account identifier or the `-` character
# to list all the invitations for all the clients
# of a given sponsor buyer.
# @param [String] page_token
# A token identifying a page of results the server should return.
# Typically, this is the value of
# ListClientUserInvitationsResponse.nextPageToken
# returned from the previous call to the
# clients.invitations.list
# method.
# @param [Fixnum] page_size
# Requested page size. Server may return fewer clients than requested.
# If unspecified, server will pick an appropriate default.
# @param [String] quota_user
# Available to 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::ListClientUserInvitationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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
command.params['accountId'] = account_id unless account_id.nil?
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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Creates and sends out an email invitation to access
# an Ad Exchange client buyer account.
# @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
# should be associated with. (required)
# @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] client_user_invitation_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::ClientUserInvitation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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
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.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
@ -329,15 +203,15 @@ module Google
# numerical account identifier or the `-` character # numerical account identifier or the `-` character
# to list all the client users for all the clients # to list all the client users for all the clients
# of a given sponsor buyer. # of a given sponsor buyer.
# @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] page_token # @param [String] page_token
# A token identifying a page of results the server should return. # A token identifying a page of results the server should return.
# Typically, this is the value of # Typically, this is the value of
# ListClientUsersResponse.nextPageToken # ListClientUsersResponse.nextPageToken
# returned from the previous call to the # returned from the previous call to the
# accounts.clients.users.list method. # accounts.clients.users.list method.
# @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] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # arbitrary string assigned to a user, but should not exceed 40 characters.
@ -355,14 +229,14 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def list_account_client_users(account_id, client_account_id, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) def list_account_client_users(account_id, client_account_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users', options) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse::Representation command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse
command.params['accountId'] = account_id unless account_id.nil? command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_id.nil? 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['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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
@ -446,6 +320,518 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Retrieves an existing client user invitation.
# @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 invitation
# to be retrieved is associated with. (required)
# @param [String] invitation_id
# Numerical identifier of the user invitation 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::ClientUserInvitation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists all the client users invitations for a client
# with a given 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 list invitations for.
# (required)
# You must either specify a string representation of a
# numerical account identifier or the `-` character
# to list all the invitations for all the clients
# of a given sponsor buyer.
# @param [Fixnum] page_size
# Requested page size. Server may return fewer clients than requested.
# If unspecified, server will pick an appropriate default.
# @param [String] page_token
# A token identifying a page of results the server should return.
# Typically, this is the value of
# ListClientUserInvitationsResponse.nextPageToken
# returned from the previous call to the
# clients.invitations.list
# method.
# @param [String] quota_user
# Available to 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::ListClientUserInvitationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_size: nil, page_token: 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
command.params['accountId'] = account_id unless account_id.nil?
command.params['clientAccountId'] = client_account_id unless client_account_id.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
# Creates and sends out an email invitation to access
# an Ad Exchange client buyer account.
# @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
# should be associated with. (required)
# @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] client_user_invitation_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::ClientUserInvitation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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
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.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists creatives.
# @param [String] account_id
# The account to list the creatives from.
# Specify "-" to list all creatives the current user has access to.
# @param [Fixnum] page_size
# Requested page size. The server may return fewer creatives than requested
# (due to timeout constraint) even if more are available via another call.
# If unspecified, server will pick an appropriate default.
# Acceptable values are 1 to 1000, inclusive.
# @param [String] query
# An optional query string to filter creatives. If no filter is specified,
# all active creatives will be returned.
# Supported queries are:
# <ul>
# <li>accountId=<i>account_id_string</i>
# <li>creativeId=<i>creative_id_string</i>
# <li>dealsStatus: `approved, conditionally_approved, disapproved,
# not_checked`
# <li>openAuctionStatus: `approved, conditionally_approved, disapproved,
# not_checked`
# <li>attribute: `a numeric attribute from the list of attributes`
# <li>disapprovalReason: `a reason from DisapprovalReason
# </ul>
# Example: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason:
# unacceptable_content) OR attribute:47'
# @param [String] page_token
# A token identifying a page of results the server should return.
# Typically, this is the value of
# ListCreativesResponse.next_page_token
# returned from the previous call to 'ListCreatives' method.
# @param [String] quota_user
# Available to 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::ListCreativesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creatives(account_id, page_size: nil, query: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse
command.params['accountId'] = account_id unless account_id.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['query'] = query unless query.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
# Creates a creative.
# @param [String] account_id
# The account that this creative belongs to.
# Can be used to filter the response of the
# creatives.list
# method.
# @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_object
# @param [String] duplicate_id_mode
# Indicates if multiple creatives can share an ID or not. Default is
# NO_DUPLICATES (one ID per creative).
# @param [String] quota_user
# Available to 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::Creative] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::Creative]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative(account_id, creative_object = nil, duplicate_id_mode: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
command.request_object = creative_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative
command.params['accountId'] = account_id unless account_id.nil?
command.query['duplicateIdMode'] = duplicate_id_mode unless duplicate_id_mode.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Stops watching a creative. Will stop push notifications being sent to the
# topics when the creative changes status.
# @param [String] account_id
# The account of the creative to stop notifications for.
# @param [String] creative_id
# The creative ID of the creative to stop notifications for.
# Specify "-" to specify stopping account level notifications.
# @param [Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest] stop_watching_creative_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::Adexchangebuyer2V2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::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 stop_watching_creative(account_id, creative_id, stop_watching_creative_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest::Representation
command.request_object = stop_watching_creative_request_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty
command.params['accountId'] = account_id unless account_id.nil?
command.params['creativeId'] = creative_id unless creative_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 creative.
# @param [String] account_id
# The account the creative belongs to.
# @param [String] creative_id
# The ID of the creative to retrieve.
# @param [String] quota_user
# Available to 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::Creative] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::Creative]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative(account_id, creative_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative
command.params['accountId'] = account_id unless account_id.nil?
command.params['creativeId'] = creative_id unless creative_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
# Watches a creative. Will result in push notifications being sent to the
# topic when the creative changes status.
# @param [String] account_id
# The account of the creative to watch.
# @param [String] creative_id
# The creative ID to watch for status changes.
# Specify "-" to watch all creatives under the above account.
# If both creative-level and account-level notifications are
# sent, only a single notification will be sent to the
# creative-level notification topic.
# @param [Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest] watch_creative_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::Adexchangebuyer2V2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::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 watch_creative(account_id, creative_id, watch_creative_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:watch', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest::Representation
command.request_object = watch_creative_request_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty
command.params['accountId'] = account_id unless account_id.nil?
command.params['creativeId'] = creative_id unless creative_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 a creative.
# @param [String] account_id
# The account that this creative belongs to.
# Can be used to filter the response of the
# creatives.list
# method.
# @param [String] creative_id
# The buyer-defined creative ID of this creative.
# Can be used to filter the response of the
# creatives.list
# method.
# @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_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::Creative] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::Creative]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative(account_id, creative_id, creative_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
command.request_object = creative_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative
command.params['accountId'] = account_id unless account_id.nil?
command.params['creativeId'] = creative_id unless creative_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
# List all creative-deal associations.
# @param [String] account_id
# The account to list the associations from.
# Specify "-" to list all creatives the current user has access to.
# @param [String] creative_id
# The creative ID to list the associations from.
# Specify "-" to list all creatives under the above account.
# @param [String] page_token
# A token identifying a page of results the server should return.
# Typically, this is the value of
# ListDealAssociationsResponse.next_page_token
# returned from the previous call to 'ListDealAssociations' method.
# @param [Fixnum] page_size
# Requested page size. Server may return fewer associations than requested.
# If unspecified, server will pick an appropriate default.
# @param [String] query
# An optional query string to filter deal associations. If no filter is
# specified, all associations will be returned.
# Supported queries are:
# <ul>
# <li>accountId=<i>account_id_string</i>
# <li>creativeId=<i>creative_id_string</i>
# <li>dealsId=<i>deals_id_string</i>
# <li>dealsStatus:`approved, conditionally_approved, disapproved,
# not_checked`
# <li>openAuctionStatus:`approved, conditionally_approved, disapproved,
# not_checked`
# </ul>
# Example: 'dealsId=12345 AND dealsStatus:disapproved'
# @param [String] quota_user
# Available to 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::ListDealAssociationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_deal_associations(account_id, creative_id, page_token: nil, page_size: nil, query: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations', options)
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse
command.params['accountId'] = account_id unless account_id.nil?
command.params['creativeId'] = creative_id unless creative_id.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['query'] = query unless query.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Associate an existing deal with a creative.
# @param [String] account_id
# The account the creative belongs to.
# @param [String] creative_id
# The ID of the creative associated with the deal.
# @param [Google::Apis::Adexchangebuyer2V2beta1::AddDealAssociationRequest] add_deal_association_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::Adexchangebuyer2V2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::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 add_deal_association(account_id, creative_id, add_deal_association_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::AddDealAssociationRequest::Representation
command.request_object = add_deal_association_request_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty
command.params['accountId'] = account_id unless account_id.nil?
command.params['creativeId'] = creative_id unless creative_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
# Remove the association between a deal and a creative.
# @param [String] account_id
# The account the creative belongs to.
# @param [String] creative_id
# The ID of the creative associated with the deal.
# @param [Google::Apis::Adexchangebuyer2V2beta1::RemoveDealAssociationRequest] remove_deal_association_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::Adexchangebuyer2V2beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::Adexchangebuyer2V2beta1::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 remove_deal_association(account_id, creative_id, remove_deal_association_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove', options)
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::RemoveDealAssociationRequest::Representation
command.request_object = remove_deal_association_request_object
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty
command.params['accountId'] = account_id unless account_id.nil?
command.params['creativeId'] = creative_id unless creative_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 protected
def apply_command_defaults(command) def apply_command_defaults(command)

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/ad-exchange/buyer-rest # @see https://developers.google.com/ad-exchange/buyer-rest
module AdexchangebuyerV1_4 module AdexchangebuyerV1_4
VERSION = 'V1_4' VERSION = 'V1_4'
REVISION = '20170118' REVISION = '20170215'
# Manage your Ad Exchange buyer account configuration # Manage your Ad Exchange buyer account configuration
AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer' AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'

View File

@ -489,7 +489,8 @@ module Google
# @return [Array<String>] # @return [Array<String>]
attr_accessor :advertiser_id attr_accessor :advertiser_id
# The name of the company being advertised in the creative. # The name of the company being advertised in the creative. The value provided
# must exist in the advertisers.txt file.
# Corresponds to the JSON property `advertiserName` # Corresponds to the JSON property `advertiserName`
# @return [String] # @return [String]
attr_accessor :advertiser_name attr_accessor :advertiser_name
@ -506,7 +507,9 @@ module Google
# @return [DateTime] # @return [DateTime]
attr_accessor :api_upload_timestamp attr_accessor :api_upload_timestamp
# All attributes for the ads that may be shown from this snippet. # List of buyer selectable attributes for the ads that may be shown from this
# snippet. Each attribute is represented by an integer as defined in buyer-
# declarable-creative-attributes.txt.
# Corresponds to the JSON property `attribute` # Corresponds to the JSON property `attribute`
# @return [Array<Fixnum>] # @return [Array<Fixnum>]
attr_accessor :attribute attr_accessor :attribute
@ -584,19 +587,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :open_auction_status attr_accessor :open_auction_status
# Detected product categories, if any. Read-only. This field should not be set # Detected product categories, if any. Each category is represented by an
# in requests. # integer as defined in ad-product-categories.txt. Read-only. This field should
# not be set in requests.
# Corresponds to the JSON property `productCategories` # Corresponds to the JSON property `productCategories`
# @return [Array<Fixnum>] # @return [Array<Fixnum>]
attr_accessor :product_categories attr_accessor :product_categories
# All restricted categories for the ads that may be shown from this snippet. # All restricted categories for the ads that may be shown from this snippet.
# Each category is represented by an integer as defined in the ad-restricted-
# categories.txt.
# Corresponds to the JSON property `restrictedCategories` # Corresponds to the JSON property `restrictedCategories`
# @return [Array<Fixnum>] # @return [Array<Fixnum>]
attr_accessor :restricted_categories attr_accessor :restricted_categories
# Detected sensitive categories, if any. Read-only. This field should not be set # Detected sensitive categories, if any. Each category is represented by an
# in requests. # integer as defined in ad-sensitive-categories.txt. Read-only. This field
# should not be set in requests.
# Corresponds to the JSON property `sensitiveCategories` # Corresponds to the JSON property `sensitiveCategories`
# @return [Array<Fixnum>] # @return [Array<Fixnum>]
attr_accessor :sensitive_categories attr_accessor :sensitive_categories
@ -609,7 +616,8 @@ module Google
# @return [Array<Google::Apis::AdexchangebuyerV1_4::Creative::ServingRestriction>] # @return [Array<Google::Apis::AdexchangebuyerV1_4::Creative::ServingRestriction>]
attr_accessor :serving_restrictions attr_accessor :serving_restrictions
# All vendor types for the ads that may be shown from this snippet. # List of vendor types for the ads that may be shown from this snippet. Each
# vendor type is represented by an integer as defined in vendors.txt.
# Corresponds to the JSON property `vendorType` # Corresponds to the JSON property `vendorType`
# @return [Array<Fixnum>] # @return [Array<Fixnum>]
attr_accessor :vendor_type attr_accessor :vendor_type
@ -774,8 +782,7 @@ module Google
# @return [String] # @return [String]
attr_accessor :filtering_count attr_accessor :filtering_count
# The filtering status code. Please refer to the creative-status-codes.txt file # The filtering status code as defined in creative-status-codes.txt.
# for different statuses.
# Corresponds to the JSON property `filteringStatus` # Corresponds to the JSON property `filteringStatus`
# @return [Fixnum] # @return [Fixnum]
attr_accessor :filtering_status attr_accessor :filtering_status
@ -1035,7 +1042,8 @@ module Google
attr_accessor :context_type attr_accessor :context_type
# Only set when contextType=LOCATION. Represents the geo criterias this # Only set when contextType=LOCATION. Represents the geo criterias this
# restriction applies to. # restriction applies to. Impressions are considered to match a context if
# either the user location or publisher location matches a given geoCriteriaId.
# Corresponds to the JSON property `geoCriteriaId` # Corresponds to the JSON property `geoCriteriaId`
# @return [Array<Fixnum>] # @return [Array<Fixnum>]
attr_accessor :geo_criteria_id attr_accessor :geo_criteria_id
@ -1180,6 +1188,14 @@ module Google
class DealServingMetadata class DealServingMetadata
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# True if alcohol ads are allowed for this deal (read-only). This field is only
# populated when querying for finalized orders using the method
# GetFinalizedOrderDeals
# Corresponds to the JSON property `alcoholAdsAllowed`
# @return [Boolean]
attr_accessor :alcohol_ads_allowed
alias_method :alcohol_ads_allowed?, :alcohol_ads_allowed
# Tracks which parties (if any) have paused a deal. The deal is considered # Tracks which parties (if any) have paused a deal. The deal is considered
# paused if has_buyer_paused || has_seller_paused. Each of the has_buyer_paused # paused if has_buyer_paused || has_seller_paused. Each of the has_buyer_paused
# or the has_seller_paused bits can be set independently. # or the has_seller_paused bits can be set independently.
@ -1193,6 +1209,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@alcohol_ads_allowed = args[:alcohol_ads_allowed] if args.key?(:alcohol_ads_allowed)
@deal_pause_status = args[:deal_pause_status] if args.key?(:deal_pause_status) @deal_pause_status = args[:deal_pause_status] if args.key?(:deal_pause_status)
end end
end end

View File

@ -802,6 +802,7 @@ module Google
class DealServingMetadata class DealServingMetadata
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :alcohol_ads_allowed, as: 'alcoholAdsAllowed'
property :deal_pause_status, as: 'dealPauseStatus', class: Google::Apis::AdexchangebuyerV1_4::DealServingMetadataDealPauseStatus, decorator: Google::Apis::AdexchangebuyerV1_4::DealServingMetadataDealPauseStatus::Representation property :deal_pause_status, as: 'dealPauseStatus', class: Google::Apis::AdexchangebuyerV1_4::DealServingMetadataDealPauseStatus, decorator: Google::Apis::AdexchangebuyerV1_4::DealServingMetadataDealPauseStatus::Representation
end end

View File

@ -28,10 +28,10 @@ module Google
VERSION = 'ReportsV1' VERSION = 'ReportsV1'
REVISION = '20160704' REVISION = '20160704'
# View audit reports of Google Apps for your domain # View audit reports for your G Suite domain
AUTH_ADMIN_REPORTS_AUDIT_READONLY = 'https://www.googleapis.com/auth/admin.reports.audit.readonly' AUTH_ADMIN_REPORTS_AUDIT_READONLY = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
# View usage reports of Google Apps for your domain # View usage reports for your G Suite domain
AUTH_ADMIN_REPORTS_USAGE_READONLY = 'https://www.googleapis.com/auth/admin.reports.usage.readonly' AUTH_ADMIN_REPORTS_USAGE_READONLY = 'https://www.googleapis.com/auth/admin.reports.usage.readonly'
end end
end end

View File

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

View File

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

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/analytics/ # @see https://developers.google.com/analytics/
module AnalyticsV3 module AnalyticsV3
VERSION = 'V3' VERSION = 'V3'
REVISION = '20161004' REVISION = '20170302'
# View and manage your Google Analytics data # View and manage your Google Analytics data
AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics' AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics'

View File

@ -25,13 +25,13 @@ module Google
# @see https://developers.google.com/analytics/devguides/reporting/core/v4/ # @see https://developers.google.com/analytics/devguides/reporting/core/v4/
module AnalyticsreportingV4 module AnalyticsreportingV4
VERSION = 'V4' VERSION = 'V4'
REVISION = '20161129' REVISION = '20170309'
# View and manage your Google Analytics data
AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics'
# View your Google Analytics data # View your Google Analytics data
AUTH_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/analytics.readonly' 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'
end end
end end
end end

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,36 @@ module Google
module Apis module Apis
module AnalyticsreportingV4 module AnalyticsreportingV4
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 class DimensionFilter
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -82,13 +112,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class MetricFilter class ReportRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ReportRequest class MetricFilter
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -124,7 +154,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ReportRow class MetricFilterClause
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -136,7 +166,7 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class MetricFilterClause class ReportRow
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -203,43 +233,69 @@ module Google
end end
class PivotHeaderEntry class PivotHeaderEntry
class Representation < Google::Apis::Core::JsonRepresentation; end # @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
include Google::Apis::Core::JsonObjectSupport collection :dimension_values, as: 'dimensionValues'
end
end end
class SegmentFilter class SegmentFilter
class Representation < Google::Apis::Core::JsonRepresentation; end # @private
class Representation < Google::Apis::Core::JsonRepresentation
property :not, as: 'not'
property :simple_segment, as: 'simpleSegment', class: Google::Apis::AnalyticsreportingV4::SimpleSegment, decorator: Google::Apis::AnalyticsreportingV4::SimpleSegment::Representation
include Google::Apis::Core::JsonObjectSupport property :sequence_segment, as: 'sequenceSegment', class: Google::Apis::AnalyticsreportingV4::SequenceSegment, decorator: Google::Apis::AnalyticsreportingV4::SequenceSegment::Representation
end
end end
class SegmentDefinition class SegmentDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end # @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :segment_filters, as: 'segmentFilters', class: Google::Apis::AnalyticsreportingV4::SegmentFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilter::Representation
include Google::Apis::Core::JsonObjectSupport end
end end
class MetricHeaderEntry class MetricHeaderEntry
class Representation < Google::Apis::Core::JsonRepresentation; end # @private
class Representation < Google::Apis::Core::JsonRepresentation
include Google::Apis::Core::JsonObjectSupport property :name, as: 'name'
property :type, as: 'type'
end
end end
class ReportData class ReportData
class Representation < Google::Apis::Core::JsonRepresentation; end # @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :sampling_space_sizes, as: 'samplingSpaceSizes'
collection :minimums, as: 'minimums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
include Google::Apis::Core::JsonObjectSupport collection :totals, as: 'totals', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
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
end
end end
class DimensionFilter class DimensionFilter
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :case_sensitive, as: 'caseSensitive'
property :dimension_name, as: 'dimensionName' property :dimension_name, as: 'dimensionName'
property :operator, as: 'operator' property :operator, as: 'operator'
property :not, as: 'not' property :not, as: 'not'
collection :expressions, as: 'expressions' collection :expressions, as: 'expressions'
property :case_sensitive, as: 'caseSensitive'
end end
end end
@ -264,12 +320,12 @@ module Google
class SegmentDimensionFilter class SegmentDimensionFilter
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :case_sensitive, as: 'caseSensitive'
property :min_comparison_value, as: 'minComparisonValue'
property :max_comparison_value, as: 'maxComparisonValue' property :max_comparison_value, as: 'maxComparisonValue'
property :dimension_name, as: 'dimensionName' property :dimension_name, as: 'dimensionName'
property :operator, as: 'operator' property :operator, as: 'operator'
collection :expressions, as: 'expressions' collection :expressions, as: 'expressions'
property :case_sensitive, as: 'caseSensitive'
property :min_comparison_value, as: 'minComparisonValue'
end end
end end
@ -285,9 +341,9 @@ module Google
class Metric class Metric
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :expression, as: 'expression'
property :formatting_type, as: 'formattingType' property :formatting_type, as: 'formattingType'
property :alias, as: 'alias' property :alias, as: 'alias'
property :expression, as: 'expression'
end end
end end
@ -301,11 +357,11 @@ module Google
class Report class Report
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 :data, as: 'data', class: Google::Apis::AnalyticsreportingV4::ReportData, decorator: Google::Apis::AnalyticsreportingV4::ReportData::Representation
property :next_page_token, as: 'nextPageToken' property :next_page_token, as: 'nextPageToken'
property :column_header, as: 'columnHeader', class: Google::Apis::AnalyticsreportingV4::ColumnHeader, decorator: Google::Apis::AnalyticsreportingV4::ColumnHeader::Representation
end end
end end
@ -321,37 +377,19 @@ module Google
class DateRange class DateRange
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :end_date, as: 'endDate'
property :start_date, as: 'startDate' property :start_date, as: 'startDate'
end property :end_date, as: 'endDate'
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
end end
class ReportRequest class ReportRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 collection :metric_filter_clauses, as: 'metricFilterClauses', class: Google::Apis::AnalyticsreportingV4::MetricFilterClause, decorator: Google::Apis::AnalyticsreportingV4::MetricFilterClause::Representation
property :page_size, as: 'pageSize' property :page_size, as: 'pageSize'
property :hide_totals, as: 'hideTotals'
property :hide_value_ranges, as: 'hideValueRanges' property :hide_value_ranges, as: 'hideValueRanges'
property :hide_totals, as: 'hideTotals'
property :filters_expression, as: 'filtersExpression' property :filters_expression, as: 'filtersExpression'
property :cohort_group, as: 'cohortGroup', class: Google::Apis::AnalyticsreportingV4::CohortGroup, decorator: Google::Apis::AnalyticsreportingV4::CohortGroup::Representation property :cohort_group, as: 'cohortGroup', class: Google::Apis::AnalyticsreportingV4::CohortGroup, decorator: Google::Apis::AnalyticsreportingV4::CohortGroup::Representation
@ -365,6 +403,24 @@ module Google
collection :segments, as: 'segments', class: Google::Apis::AnalyticsreportingV4::Segment, decorator: Google::Apis::AnalyticsreportingV4::Segment::Representation collection :segments, as: 'segments', class: Google::Apis::AnalyticsreportingV4::Segment, decorator: Google::Apis::AnalyticsreportingV4::Segment::Representation
property :sampling_level, as: 'samplingLevel' property :sampling_level, as: 'samplingLevel'
collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation
property :page_token, as: 'pageToken'
collection :date_ranges, as: 'dateRanges', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation
collection :pivots, as: 'pivots', class: Google::Apis::AnalyticsreportingV4::Pivot, decorator: Google::Apis::AnalyticsreportingV4::Pivot::Representation
property :include_empty_rows, as: 'includeEmptyRows'
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
end end
@ -407,20 +463,20 @@ module Google
class SegmentFilterClause class SegmentFilterClause
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 :not, as: 'not'
property :dimension_filter, as: 'dimensionFilter', class: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter::Representation 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
end end
end end
class ReportRow class MetricFilterClause
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation property :operator, as: 'operator'
collection :filters, as: 'filters', class: Google::Apis::AnalyticsreportingV4::MetricFilter, decorator: Google::Apis::AnalyticsreportingV4::MetricFilter::Representation
collection :dimensions, as: 'dimensions'
end end
end end
@ -434,12 +490,12 @@ module Google
end end
end end
class MetricFilterClause class ReportRow
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :operator, as: 'operator' collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
collection :filters, as: 'filters', class: Google::Apis::AnalyticsreportingV4::MetricFilter, decorator: Google::Apis::AnalyticsreportingV4::MetricFilter::Representation
collection :dimensions, as: 'dimensions'
end end
end end
@ -481,20 +537,20 @@ module Google
class SequenceSegment class SequenceSegment
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 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
end end
class SegmentMetricFilter class SegmentMetricFilter
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :metric_name, as: 'metricName'
property :scope, as: 'scope'
property :max_comparison_value, as: 'maxComparisonValue' property :max_comparison_value, as: 'maxComparisonValue'
property :comparison_value, as: 'comparisonValue' property :comparison_value, as: 'comparisonValue'
property :operator, as: 'operator' property :operator, as: 'operator'
property :metric_name, as: 'metricName'
property :scope, as: 'scope'
end end
end end
@ -537,62 +593,6 @@ module Google
end end
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
class SegmentFilter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :sequence_segment, as: 'sequenceSegment', class: Google::Apis::AnalyticsreportingV4::SequenceSegment, decorator: Google::Apis::AnalyticsreportingV4::SequenceSegment::Representation
property :not, as: 'not'
property :simple_segment, as: 'simpleSegment', class: Google::Apis::AnalyticsreportingV4::SimpleSegment, decorator: Google::Apis::AnalyticsreportingV4::SimpleSegment::Representation
end
end
class SegmentDefinition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :segment_filters, as: 'segmentFilters', class: Google::Apis::AnalyticsreportingV4::SegmentFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilter::Representation
end
end
class MetricHeaderEntry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :type, as: 'type'
end
end
class ReportData
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :totals, as: 'totals', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation
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
end
end
end end
end end
end end

View File

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

View File

@ -374,15 +374,15 @@ module Google
end end
end end
# A device resource represents a mobile device managed by the EMM and belonging # A Devices resource represents a mobile device managed by the EMM and belonging
# to a specific enterprise user. # to a specific enterprise user.
# This collection cannot be modified via the API; it is automatically populated # This collection cannot be modified via the API. It is automatically populated
# as devices are set up to be managed. # as devices are set up to be managed.
class Device class Device
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# The Google Play Services Android ID for the device encoded as a lowercase hex # The Google Play Services Android ID for the device encoded as a lowercase hex
# string, e.g. "123456789abcdef0". # string. For example, "123456789abcdef0".
# Corresponds to the JSON property `androidId` # Corresponds to the JSON property `androidId`
# @return [String] # @return [String]
attr_accessor :android_id attr_accessor :android_id
@ -613,30 +613,26 @@ module Google
end end
end end
# The existence of an entitlement resource means that a user has the right to # The presence of an Entitlements resource indicates that a user has the right
# use a particular app on any of their devices. This might be because the app is # to use a particular app. Entitlements are user specific, not device specific.
# free or because they have been allocated a license to the app from a group # This allows a user with an entitlement to an app to install the app on all
# license purchased by the enterprise. # their devices. It's also possible for a user to hold an entitlement to an app
# It should always be true that a user has an app installed on one of their # without installing the app on any device.
# devices only if they have an entitlement to it. So if an entitlement is # The API can be used to create an entitlement. As an option, you can also use
# deleted, the app will be uninstalled from all devices. Similarly if the user # the API to trigger the installation of an app on all a user's managed devices
# installs an app (and is permitted to do so), or the EMM triggers an install of # at the same time the entitlement is created.
# the app, an entitlement to that app is automatically created. If this is # If the app is free, creating the entitlement also creates a group license for
# impossible - e.g. the enterprise has not purchased sufficient licenses - then # that app. For paid apps, creating the entitlement consumes one license, and
# installation fails. # that license remains consumed until the entitlement is removed. If the
# Note that entitlements are always user specific, not device specific; a user # enterprise hasn't purchased enough licenses, then no entitlement is created
# may have an entitlement even though they have not installed the app anywhere. # and the installation fails. An entitlement is also not created for an app if
# Once they have an entitlement they can install the app on multiple devices. # the app requires permissions that the enterprise hasn't accepted.
# The API can be used to create an entitlement. If the app is a free app, a # If an entitlement is deleted, the app may be uninstalled from a user's device.
# group license for that app is created. If it's a paid app, creating the # As a best practice, uninstall the app by calling Installs.delete() before
# entitlement consumes one license; it remains consumed until the entitlement is # deleting the entitlement.
# removed. Optionally an installation of the app on all the user's managed # Entitlements for apps that a user pays for on an unmanaged profile have "
# devices can be triggered at the time the entitlement is created. An # userPurchase" as the entitlement reason. These entitlements cannot be removed
# entitlement cannot be created for an app if the app requires permissions that # via the API.
# the enterprise has not yet accepted.
# Entitlements for paid apps that are due to purchases by the user on a non-
# managed profile will have "userPurchase" as entitlement reason; those
# entitlements cannot be removed via the API.
class Entitlement class Entitlement
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -646,14 +642,15 @@ module Google
# @return [String] # @return [String]
attr_accessor :kind attr_accessor :kind
# The ID of the product that the entitlement is for, e.g. "app:com.google. # The ID of the product that the entitlement is for. For example, "app:com.
# android.gm". # google.android.gm".
# Corresponds to the JSON property `productId` # Corresponds to the JSON property `productId`
# @return [String] # @return [String]
attr_accessor :product_id attr_accessor :product_id
# The reason for the entitlement, e.g. "free" for free apps. This is temporary, # The reason for the entitlement. For example, "free" for free apps. This
# it will be replaced by the acquisition kind field of group licenses. # property is temporary: it will be replaced by the acquisition kind field of
# group licenses.
# Corresponds to the JSON property `reason` # Corresponds to the JSON property `reason`
# @return [String] # @return [String]
attr_accessor :reason attr_accessor :reason
@ -717,19 +714,18 @@ module Google
class GroupLicense class GroupLicense
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# How this group license was acquired. "bulkPurchase" means that this group # How this group license was acquired. "bulkPurchase" means that this
# license object was created because the enterprise purchased licenses for this # Grouplicenses resource was created because the enterprise purchased licenses
# product; this is "free" otherwise (for free products). # for this product; otherwise, the value is "free" (for free products).
# Corresponds to the JSON property `acquisitionKind` # Corresponds to the JSON property `acquisitionKind`
# @return [String] # @return [String]
attr_accessor :acquisition_kind attr_accessor :acquisition_kind
# Whether the product to which this group license relates is currently approved # Whether the product to which this group license relates is currently approved
# by the enterprise, as either "approved" or "unapproved". Products are approved # by the enterprise. Products are approved when a group license is first created,
# when a group license is first created, but this approval may be revoked by an # but this approval may be revoked by an enterprise admin via Google Play.
# enterprise admin via Google Play. Unapproved products will not be visible to # Unapproved products will not be visible to end users in collections, and new
# end users in collections and new entitlements to them should not normally be # entitlements to them should not normally be created.
# created.
# Corresponds to the JSON property `approval` # Corresponds to the JSON property `approval`
# @return [String] # @return [String]
attr_accessor :approval attr_accessor :approval
@ -747,14 +743,14 @@ module Google
attr_accessor :num_provisioned attr_accessor :num_provisioned
# The number of purchased licenses (possibly in multiple purchases). If this # The number of purchased licenses (possibly in multiple purchases). If this
# field is omitted then there is no limit on the number of licenses that can be # field is omitted, then there is no limit on the number of licenses that can be
# provisioned (e.g. if the acquisition kind is "free"). # provisioned (for example, if the acquisition kind is "free").
# Corresponds to the JSON property `numPurchased` # Corresponds to the JSON property `numPurchased`
# @return [Fixnum] # @return [Fixnum]
attr_accessor :num_purchased attr_accessor :num_purchased
# The ID of the product that the license is for, e.g. "app:com.google.android.gm" # The ID of the product that the license is for. For example, "app:com.google.
# . # android.gm".
# Corresponds to the JSON property `productId` # Corresponds to the JSON property `productId`
# @return [String] # @return [String]
attr_accessor :product_id attr_accessor :product_id
@ -826,18 +822,18 @@ module Google
end end
end end
# The existence of an install resource indicates that an app is installed on a # The existence of an Installs resource indicates that an app is installed on a
# particular device (or that an install is pending). # particular device (or that an install is pending).
# The API can be used to create an install resource using the update method. # The API can be used to create an install resource using the update method.
# This triggers the actual install of the app on the device. If the user does # This triggers the actual install of the app on the device. If the user does
# not already have an entitlement for the app then an attempt is made to create # not already have an entitlement for the app, then an attempt is made to create
# one. If this fails (e.g. because the app is not free and there is no available # one. If this fails (for example, because the app is not free and there is no
# license) then the creation of the install fails. # available license), then the creation of the install fails.
# The API can also be used to update an installed app. If the update method is # The API can also be used to update an installed app. If the update method is
# used on an existing install then the app will be updated to the latest # used on an existing install, then the app will be updated to the latest
# available version. # available version.
# Note that it is not possible to force the installation of a specific version # Note that it is not possible to force the installation of a specific version
# of an app; the version code is read-only. # of an app: the version code is read-only.
# If a user installs an app themselves (as permitted by the enterprise), then # If a user installs an app themselves (as permitted by the enterprise), then
# again an install resource and possibly an entitlement resource are # again an install resource and possibly an entitlement resource are
# automatically created. # automatically created.
@ -862,8 +858,8 @@ module Google
# @return [String] # @return [String]
attr_accessor :kind attr_accessor :kind
# The ID of the product that the install is for, e.g. "app:com.google.android.gm" # The ID of the product that the install is for. For example, "app:com.google.
# . # android.gm".
# Corresponds to the JSON property `productId` # Corresponds to the JSON property `productId`
# @return [String] # @return [String]
attr_accessor :product_id attr_accessor :product_id
@ -1161,14 +1157,11 @@ module Google
# @return [String] # @return [String]
attr_accessor :device_id attr_accessor :device_id
# Identifies the extent to which the device is controlled by an Android for Work # Identifies the extent to which the device is controlled by an Android EMM in
# EMM in various deployment configurations. # various deployment configurations.
# Possible values include: # Possible values include:
# - "managedDevice", a device that has the EMM's device policy controller (DPC) # - "managedDevice", a device where the DPC is set as device owner,
# as the device owner, # - "managedProfile", a device where the DPC is set as profile owner.
# - "managedProfile", a device that has a work profile managed by the DPC (DPC
# is profile owner) in addition to a separate, personal profile that is
# unavailable to the DPC,
# Corresponds to the JSON property `managementType` # Corresponds to the JSON property `managementType`
# @return [String] # @return [String]
attr_accessor :management_type attr_accessor :management_type
@ -1366,17 +1359,18 @@ module Google
end end
end end
# A permission represents some extra capability, to be granted to an Android app, # A Permissions resource represents some extra capability, to be granted to an
# which requires explicit consent. An enterprise admin must consent to these # Android app, which requires explicit consent. An enterprise admin must consent
# permissions on behalf of their users before an entitlement for the app can be # to these permissions on behalf of their users before an entitlement for the
# created. # app can be created.
# The permissions collection is read-only. The information provided for each # The permissions collection is read-only. The information provided for each
# permission (localized name and description) is intended to be used in the EMM # permission (localized name and description) is intended to be used in the MDM
# user interface when obtaining consent from the enterprise. # user interface when obtaining consent from the enterprise.
class Permission class Permission
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# A longer description of the permissions giving more details of what it affects. # A longer description of the Permissions resource, giving more details of what
# it affects.
# Corresponds to the JSON property `description` # Corresponds to the JSON property `description`
# @return [String] # @return [String]
attr_accessor :description attr_accessor :description
@ -1426,7 +1420,7 @@ module Google
# @return [Array<Google::Apis::AndroidenterpriseV1::AppVersion>] # @return [Array<Google::Apis::AndroidenterpriseV1::AppVersion>]
attr_accessor :app_version attr_accessor :app_version
# The name of the author of the product (e.g. the app developer). # The name of the author of the product (for example, the app developer).
# Corresponds to the JSON property `authorName` # Corresponds to the JSON property `authorName`
# @return [String] # @return [String]
attr_accessor :author_name attr_accessor :author_name

View File

@ -341,9 +341,9 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Deletes the binding between the EMM and enterprise. This is now deprecated; # Deletes the binding between the EMM and enterprise. This is now deprecated.
# use this to unenroll customers that were previously enrolled with the 'insert' # Use this method only to unenroll customers that were previously enrolled with
# call, then enroll them again with the 'enroll' call. # the insert call, then enroll them again with the enroll call.
# @param [String] enterprise_id # @param [String] enterprise_id
# The ID of the enterprise. # The ID of the enterprise.
# @param [String] fields # @param [String] fields
@ -656,8 +656,8 @@ module Google
# service account authenticated for the request. The notification set may be # service account authenticated for the request. The notification set may be
# empty if no notification are pending. # empty if no notification are pending.
# A notification set returned needs to be acknowledged within 20 seconds by # A notification set returned needs to be acknowledged within 20 seconds by
# calling Enterprises.AcknowledgeNotificationSet, unless the notification set # calling Enterprises.AcknowledgeNotificationSet, unless the notification set is
# is empty. # empty.
# Notifications that are not acknowledged within the 20 seconds will eventually # Notifications that are not acknowledged within the 20 seconds will eventually
# be included again in the response to another PullNotificationSet request, and # be included again in the response to another PullNotificationSet request, and
# those that are never acknowledged will ultimately be deleted according to the # those that are never acknowledged will ultimately be deleted according to the
@ -743,7 +743,8 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Set the account that will be used to authenticate to the API as the enterprise. # Sets the account that will be used to authenticate to the API as the
# enterprise.
# @param [String] enterprise_id # @param [String] enterprise_id
# The ID of the enterprise. # The ID of the enterprise.
# @param [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] enterprise_account_object # @param [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] enterprise_account_object
@ -858,7 +859,7 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Removes an entitlement to an app for a user and uninstalls it. # Removes an entitlement to an app for a user.
# @param [String] enterprise_id # @param [String] enterprise_id
# The ID of the enterprise. # The ID of the enterprise.
# @param [String] user_id # @param [String] user_id
@ -938,7 +939,7 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# List of all entitlements for the specified user. Only the ID is set. # Lists all entitlements for the specified user. Only the ID is set.
# @param [String] enterprise_id # @param [String] enterprise_id
# The ID of the enterprise. # The ID of the enterprise.
# @param [String] user_id # @param [String] user_id
@ -1322,7 +1323,7 @@ module Google
end end
# Requests to install the latest version of an app to a device. If the app is # Requests to install the latest version of an app to a device. If the app is
# already installed then it is updated to the latest version if necessary. This # already installed, then it is updated to the latest version if necessary. This
# method supports patch semantics. # method supports patch semantics.
# @param [String] enterprise_id # @param [String] enterprise_id
# The ID of the enterprise. # The ID of the enterprise.
@ -1372,7 +1373,7 @@ module Google
end end
# Requests to install the latest version of an app to a device. If the app is # Requests to install the latest version of an app to a device. If the app is
# already installed then it is updated to the latest version if necessary. # already installed, then it is updated to the latest version if necessary.
# @param [String] enterprise_id # @param [String] enterprise_id
# The ID of the enterprise. # The ID of the enterprise.
# @param [String] user_id # @param [String] user_id
@ -2138,7 +2139,7 @@ module Google
# approved apps will be returned (using the pagination parameters), including # approved apps will be returned (using the pagination parameters), including
# apps that are not available in the store (e.g. unpublished apps). # apps that are not available in the store (e.g. unpublished apps).
# @param [String] token # @param [String] token
# A pagination token is contained in a request’s response when there are more # A pagination token is contained in a request''s response when there are more
# products. The token can be used in a subsequent request to obtain more # products. The token can be used in a subsequent request to obtain more
# products, and so forth. This parameter cannot be used in the initial request. # products, and so forth. This parameter cannot be used in the initial request.
# @param [String] fields # @param [String] fields

View File

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

View File

@ -1583,6 +1583,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :start_time_millis attr_accessor :start_time_millis
# The time at which the subscription was canceled by the user, in milliseconds
# since the epoch. Only present if cancelReason is 0.
# Corresponds to the JSON property `userCancellationTimeMillis`
# @return [String]
attr_accessor :user_cancellation_time_millis
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -1599,6 +1605,7 @@ module Google
@price_amount_micros = args[:price_amount_micros] if args.key?(:price_amount_micros) @price_amount_micros = args[:price_amount_micros] if args.key?(:price_amount_micros)
@price_currency_code = args[:price_currency_code] if args.key?(:price_currency_code) @price_currency_code = args[:price_currency_code] if args.key?(:price_currency_code)
@start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis) @start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis)
@user_cancellation_time_millis = args[:user_cancellation_time_millis] if args.key?(:user_cancellation_time_millis)
end end
end end

View File

@ -869,6 +869,7 @@ module Google
property :price_amount_micros, as: 'priceAmountMicros' property :price_amount_micros, as: 'priceAmountMicros'
property :price_currency_code, as: 'priceCurrencyCode' property :price_currency_code, as: 'priceCurrencyCode'
property :start_time_millis, as: 'startTimeMillis' property :start_time_millis, as: 'startTimeMillis'
property :user_cancellation_time_millis, as: 'userCancellationTimeMillis'
end end
end end

View File

@ -2474,7 +2474,7 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Returns a list of reviews. # Returns a list of reviews. Only reviews from last week will be returned.
# @param [String] package_name # @param [String] package_name
# Unique identifier for the Android app for which we want reviews; for example, " # Unique identifier for the Android app for which we want reviews; for example, "
# com.spiffygame". # com.spiffygame".

View File

@ -18,16 +18,16 @@ require 'google/apis/appsactivity_v1/representations.rb'
module Google module Google
module Apis module Apis
# Google Apps Activity API # G Suite Activity API
# #
# Provides a historical view of activity. # Provides a historical view of activity.
# #
# @see https://developers.google.com/google-apps/activity/ # @see https://developers.google.com/google-apps/activity/
module AppsactivityV1 module AppsactivityV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20161202' REVISION = '20170215'
# View the activity history of your Google Apps # View the activity history of your Google apps
AUTH_ACTIVITY = 'https://www.googleapis.com/auth/activity' AUTH_ACTIVITY = 'https://www.googleapis.com/auth/activity'
# View and manage the files in your Google Drive # View and manage the files in your Google Drive

View File

@ -20,7 +20,7 @@ require 'google/apis/errors'
module Google module Google
module Apis module Apis
module AppsactivityV1 module AppsactivityV1
# Google Apps Activity API # G Suite Activity API
# #
# Provides a historical view of activity. # Provides a historical view of activity.
# #

View File

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

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/bigquery/ # @see https://cloud.google.com/bigquery/
module BigqueryV2 module BigqueryV2
VERSION = 'V2' VERSION = 'V2'
REVISION = '20170114' REVISION = '20170224'
# View and manage your data in Google BigQuery # View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'

View File

@ -1069,10 +1069,10 @@ module Google
# [Experimental] The labels associated with this job. You can use these to # [Experimental] The labels associated with this job. You can use these to
# organize and group your jobs. Label keys and values can be no longer than 63 # organize and group your jobs. Label keys and values can be no longer than 63
# characters, can only contain letters, numeric characters, underscores and # characters, can only contain lowercase letters, numeric characters,
# dashes. International characters are allowed. Label values are optional. Label # underscores and dashes. International characters are allowed. Label values are
# keys must start with a letter and must be unique within a dataset. Both keys # optional. Label keys must start with a letter and each label in the list must
# and values are additionally constrained to be <= 128 bytes in size. # have a different key.
# Corresponds to the JSON property `labels` # Corresponds to the JSON property `labels`
# @return [Hash<String,String>] # @return [Hash<String,String>]
attr_accessor :labels attr_accessor :labels
@ -2472,10 +2472,10 @@ module Google
# [Experimental] The labels associated with this table. You can use these to # [Experimental] The labels associated with this table. You can use these to
# organize and group your tables. Label keys and values can be no longer than 63 # organize and group your tables. Label keys and values can be no longer than 63
# characters, can only contain letters, numeric characters, underscores and # characters, can only contain lowercase letters, numeric characters,
# dashes. International characters are allowed. Label values are optional. Label # underscores and dashes. International characters are allowed. Label values are
# keys must start with a letter and must be unique within a dataset. Both keys # optional. Label keys must start with a letter and each label in the list must
# and values are additionally constrained to be <= 128 bytes in size. # have a different key.
# Corresponds to the JSON property `labels` # Corresponds to the JSON property `labels`
# @return [Hash<String,String>] # @return [Hash<String,String>]
attr_accessor :labels attr_accessor :labels
@ -2901,6 +2901,11 @@ module Google
# @return [String] # @return [String]
attr_accessor :type attr_accessor :type
# Additional details for a view.
# Corresponds to the JSON property `view`
# @return [Google::Apis::BigqueryV2::TableList::Table::View]
attr_accessor :view
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -2913,6 +2918,27 @@ module Google
@labels = args[:labels] if args.key?(:labels) @labels = args[:labels] if args.key?(:labels)
@table_reference = args[:table_reference] if args.key?(:table_reference) @table_reference = args[:table_reference] if args.key?(:table_reference)
@type = args[:type] if args.key?(:type) @type = args[:type] if args.key?(:type)
@view = args[:view] if args.key?(:view)
end
# Additional details for a view.
class View
include Google::Apis::Core::Hashable
# True if view is defined in legacy SQL dialect, false if in standard SQL.
# Corresponds to the JSON property `useLegacySql`
# @return [Boolean]
attr_accessor :use_legacy_sql
alias_method :use_legacy_sql?, :use_legacy_sql
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@use_legacy_sql = args[:use_legacy_sql] if args.key?(:use_legacy_sql)
end
end end
end end
end end

View File

@ -316,6 +316,12 @@ module Google
class Table class Table
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
class View
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
@ -1035,6 +1041,15 @@ module Google
property :table_reference, as: 'tableReference', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation property :table_reference, as: 'tableReference', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :type, as: 'type' property :type, as: 'type'
property :view, as: 'view', class: Google::Apis::BigqueryV2::TableList::Table::View, decorator: Google::Apis::BigqueryV2::TableList::Table::View::Representation
end
class View
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :use_legacy_sql, as: 'useLegacySql'
end
end end
end end
end end

View File

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

View File

@ -427,8 +427,7 @@ module Google
# The method used to deliver the notification. Possible values are: # The method used to deliver the notification. Possible values are:
# - "email" - Reminders are sent via email. # - "email" - Reminders are sent via email.
# - "sms" - Reminders are sent via SMS. This value is read-only and is ignored # - "sms" - Reminders are sent via SMS. This value is read-only and is ignored
# on inserts and updates. SMS reminders are only available for Google Apps for # on inserts and updates. SMS reminders are only available for G Suite customers.
# Work, Education, and Government customers.
# Corresponds to the JSON property `method` # Corresponds to the JSON property `method`
# @return [String] # @return [String]
attr_accessor :delivery_method attr_accessor :delivery_method
@ -1346,9 +1345,8 @@ module Google
# The method used by this reminder. Possible values are: # The method used by this reminder. Possible values are:
# - "email" - Reminders are sent via email. # - "email" - Reminders are sent via email.
# - "sms" - Reminders are sent via SMS. These are only available for Google Apps # - "sms" - Reminders are sent via SMS. These are only available for G Suite
# for Work, Education, and Government customers. Requests to set SMS reminders # customers. Requests to set SMS reminders for other account types are ignored.
# for other account types are ignored.
# - "popup" - Reminders are sent via a UI popup. # - "popup" - Reminders are sent via a UI popup.
# Corresponds to the JSON property `method` # Corresponds to the JSON property `method`
# @return [String] # @return [String]

View File

@ -25,7 +25,37 @@ module Google
# @see https://developers.google.com/classroom/ # @see https://developers.google.com/classroom/
module ClassroomV1 module ClassroomV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20170213' 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'
# View your Google Classroom class rosters # View your Google Classroom class rosters
AUTH_CLASSROOM_ROSTERS_READONLY = 'https://www.googleapis.com/auth/classroom.rosters.readonly' AUTH_CLASSROOM_ROSTERS_READONLY = 'https://www.googleapis.com/auth/classroom.rosters.readonly'
@ -33,35 +63,8 @@ module Google
# View your course work and grades in Google Classroom # 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' 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 # 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' 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 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

@ -20,13 +20,13 @@ module Google
module Apis module Apis
# Google Cloud Billing API # Google Cloud Billing API
# #
# Retrieves Google Developers Console billing accounts and associates them with # Allows developers to manage billing for their Google Cloud Platform projects
# projects. # programmatically.
# #
# @see https://cloud.google.com/billing/ # @see https://cloud.google.com/billing/
module CloudbillingV1 module CloudbillingV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20151222' REVISION = '20170210'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -22,19 +22,122 @@ module Google
module Apis module Apis
module CloudbillingV1 module CloudbillingV1
# A billing account in [Google Developers Console](https://console.developers. # Encapsulation of billing information for a Cloud Console project. A project
# google.com/). You can assign a billing account to one or more projects. # has at most one associated billing account at a time (but a billing account
class BillingAccount # can be assigned to multiple projects).
class ProjectBillingInfo
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# The resource name of the billing account. The resource name has the form ` # True if the project is associated with an open billing account, to which
# billingAccounts/`billing_account_id``. For example, `billingAccounts/012345- # usage on the project is charged. False if the project is associated with a
# 567890-ABCDEF` would be the resource name for billing account `012345-567890- # closed billing account, or no billing account at all, and therefore cannot
# ABCDEF`. # use paid services. This field is read-only.
# Corresponds to the JSON property `billingEnabled`
# @return [Boolean]
attr_accessor :billing_enabled
alias_method :billing_enabled?, :billing_enabled
# The resource name for the `ProjectBillingInfo`; has the form
# `projects/`project_id`/billingInfo`. For example, the resource name for the
# billing information for project `tokyo-rain-123` would be
# `projects/tokyo-rain-123/billingInfo`. This field is read-only.
# Corresponds to the JSON property `name` # Corresponds to the JSON property `name`
# @return [String] # @return [String]
attr_accessor :name attr_accessor :name
# The ID of the project that this `ProjectBillingInfo` represents, such as
# `tokyo-rain-123`. This is a convenience field so that you don't need to
# parse the `name` field to obtain a project ID. This field is read-only.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# The resource name of the billing account associated with the project, if
# any. For example, `billingAccounts/012345-567890-ABCDEF`.
# Corresponds to the JSON property `billingAccountName`
# @return [String]
attr_accessor :billing_account_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@billing_enabled = args[:billing_enabled] if args.key?(:billing_enabled)
@name = args[:name] if args.key?(:name)
@project_id = args[:project_id] if args.key?(:project_id)
@billing_account_name = args[:billing_account_name] if args.key?(:billing_account_name)
end
end
# Request message for `ListProjectBillingInfoResponse`.
class ListProjectBillingInfoResponse
include Google::Apis::Core::Hashable
# A token to retrieve the next page of results. To retrieve the next page,
# call `ListProjectBillingInfo` again with the `page_token` field set to this
# value. This field is empty if there are no more results to retrieve.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# A list of `ProjectBillingInfo` resources representing the projects
# associated with the billing account.
# Corresponds to the JSON property `projectBillingInfo`
# @return [Array<Google::Apis::CloudbillingV1::ProjectBillingInfo>]
attr_accessor :project_billing_info
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)
@project_billing_info = args[:project_billing_info] if args.key?(:project_billing_info)
end
end
# Response message for `ListBillingAccounts`.
class ListBillingAccountsResponse
include Google::Apis::Core::Hashable
# A token to retrieve the next page of results. To retrieve the next page,
# call `ListBillingAccounts` again with the `page_token` field set to this
# value. This field is empty if there are no more results to retrieve.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# A list of billing accounts.
# Corresponds to the JSON property `billingAccounts`
# @return [Array<Google::Apis::CloudbillingV1::BillingAccount>]
attr_accessor :billing_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)
@billing_accounts = args[:billing_accounts] if args.key?(:billing_accounts)
end
end
# A billing account in [Google Cloud
# Console](https://console.cloud.google.com/). You can assign a billing account
# to one or more projects.
class BillingAccount
include Google::Apis::Core::Hashable
# The display name given to the billing account, such as `My Billing
# Account`. This name is displayed in the Google Cloud Console.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# True if the billing account is open, and will therefore be charged for any # True if the billing account is open, and will therefore be charged for any
# usage on associated projects. False if the billing account is closed, and # usage on associated projects. False if the billing account is closed, and
# therefore projects associated with it will be unable to use paid services. # therefore projects associated with it will be unable to use paid services.
@ -43,125 +146,23 @@ module Google
attr_accessor :open attr_accessor :open
alias_method :open?, :open alias_method :open?, :open
# The display name given to the billing account, such as `My Billing Account`. # The resource name of the billing account. The resource name has the form
# This name is displayed in the Google Developers Console. # `billingAccounts/`billing_account_id``. For example,
# Corresponds to the JSON property `displayName` # `billingAccounts/012345-567890-ABCDEF` would be the resource name for
# @return [String] # billing account `012345-567890-ABCDEF`.
attr_accessor :display_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@open = args[:open] if args.key?(:open)
@display_name = args[:display_name] if args.key?(:display_name)
end
end
# Response message for `ListBillingAccounts`.
class ListBillingAccountsResponse
include Google::Apis::Core::Hashable
# A list of billing accounts.
# Corresponds to the JSON property `billingAccounts`
# @return [Array<Google::Apis::CloudbillingV1::BillingAccount>]
attr_accessor :billing_accounts
# A token to retrieve the next page of results. To retrieve the next page, call `
# ListBillingAccounts` again with the `page_token` field set to this value. This
# field is empty if there are no more results to retrieve.
# 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)
@billing_accounts = args[:billing_accounts] if args.key?(:billing_accounts)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Request message for `ListProjectBillingInfoResponse`.
class ListProjectBillingInfoResponse
include Google::Apis::Core::Hashable
# A list of `ProjectBillingInfo` resources representing the projects associated
# with the billing account.
# Corresponds to the JSON property `projectBillingInfo`
# @return [Array<Google::Apis::CloudbillingV1::ProjectBillingInfo>]
attr_accessor :project_billing_info
# A token to retrieve the next page of results. To retrieve the next page, call `
# ListProjectBillingInfo` again with the `page_token` field set to this value.
# This field is empty if there are no more results to retrieve.
# 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)
@project_billing_info = args[:project_billing_info] if args.key?(:project_billing_info)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Encapsulation of billing information for a Developers Console project. A
# project has at most one associated billing account at a time (but a billing
# account can be assigned to multiple projects).
class ProjectBillingInfo
include Google::Apis::Core::Hashable
# The resource name for the `ProjectBillingInfo`; has the form `projects/`
# project_id`/billingInfo`. For example, the resource name for the billing
# information for project `tokyo-rain-123` would be `projects/tokyo-rain-123/
# billingInfo`. This field is read-only.
# Corresponds to the JSON property `name` # Corresponds to the JSON property `name`
# @return [String] # @return [String]
attr_accessor :name attr_accessor :name
# The ID of the project that this `ProjectBillingInfo` represents, such as `
# tokyo-rain-123`. This is a convenience field so that you don't need to parse
# the `name` field to obtain a project ID. This field is read-only.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# The resource name of the billing account associated with the project, if any.
# For example, `billingAccounts/012345-567890-ABCDEF`.
# Corresponds to the JSON property `billingAccountName`
# @return [String]
attr_accessor :billing_account_name
# True if the project is associated with an open billing account, to which usage
# on the project is charged. False if the project is associated with a closed
# billing account, or no billing account at all, and therefore cannot use paid
# services. This field is read-only.
# Corresponds to the JSON property `billingEnabled`
# @return [Boolean]
attr_accessor :billing_enabled
alias_method :billing_enabled?, :billing_enabled
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@open = args[:open] if args.key?(:open)
@name = args[:name] if args.key?(:name) @name = args[:name] if args.key?(:name)
@project_id = args[:project_id] if args.key?(:project_id)
@billing_account_name = args[:billing_account_name] if args.key?(:billing_account_name)
@billing_enabled = args[:billing_enabled] if args.key?(:billing_enabled)
end end
end end
end end

View File

@ -22,13 +22,7 @@ module Google
module Apis module Apis
module CloudbillingV1 module CloudbillingV1
class BillingAccount class ProjectBillingInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListBillingAccountsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -40,46 +34,52 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ProjectBillingInfo class ListBillingAccountsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class BillingAccount class BillingAccount
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :open, as: 'open'
property :display_name, as: 'displayName'
end
end
class ListBillingAccountsResponse include Google::Apis::Core::JsonObjectSupport
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :billing_accounts, as: 'billingAccounts', class: Google::Apis::CloudbillingV1::BillingAccount, decorator: Google::Apis::CloudbillingV1::BillingAccount::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class ListProjectBillingInfoResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :project_billing_info, as: 'projectBillingInfo', class: Google::Apis::CloudbillingV1::ProjectBillingInfo, decorator: Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
property :next_page_token, as: 'nextPageToken'
end
end end
class ProjectBillingInfo class ProjectBillingInfo
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :billing_enabled, as: 'billingEnabled'
property :name, as: 'name' property :name, as: 'name'
property :project_id, as: 'projectId' property :project_id, as: 'projectId'
property :billing_account_name, as: 'billingAccountName' property :billing_account_name, as: 'billingAccountName'
property :billing_enabled, as: 'billingEnabled' end
end
class ListProjectBillingInfoResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :project_billing_info, as: 'projectBillingInfo', class: Google::Apis::CloudbillingV1::ProjectBillingInfo, decorator: Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
end
end
class ListBillingAccountsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :billing_accounts, as: 'billingAccounts', class: Google::Apis::CloudbillingV1::BillingAccount, decorator: Google::Apis::CloudbillingV1::BillingAccount::Representation
end
end
class BillingAccount
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :open, as: 'open'
property :name, as: 'name'
end end
end end
end end

View File

@ -22,8 +22,8 @@ module Google
module CloudbillingV1 module CloudbillingV1
# Google Cloud Billing API # Google Cloud Billing API
# #
# Retrieves Google Developers Console billing accounts and associates them with # Allows developers to manage billing for their Google Cloud Platform projects
# projects. # programmatically.
# #
# @example # @example
# require 'google/apis/cloudbilling_v1' # require 'google/apis/cloudbilling_v1'
@ -47,17 +47,111 @@ module Google
super('https://cloudbilling.googleapis.com/', '') super('https://cloudbilling.googleapis.com/', '')
end end
# Gets information about a billing account. The current authenticated user must # Sets or updates the billing account associated with a project. You specify
# be an [owner of the billing account](https://support.google.com/cloud/answer/ # the new billing account by setting the `billing_account_name` in the
# 4430947). # `ProjectBillingInfo` resource to the resource name of a billing account.
# Associating a project with an open billing account enables billing on the
# project and allows charges for resource usage. If the project already had a
# billing account, this method changes the billing account used for resource
# usage charges.
# *Note:* Incurred charges that have not yet been reported in the transaction
# history of the Google Cloud Console may be billed to the new billing
# account, even if the charge occurred before the new billing account was
# assigned to the project.
# The current authenticated user must have ownership privileges for both the
# [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
# ) and the [billing
# account](https://support.google.com/cloud/answer/4430947).
# You can disable billing on the project by setting the
# `billing_account_name` field to empty. This action disassociates the
# current billing account from the project. Any billable activity of your
# in-use services will stop, and your application could stop functioning as
# expected. Any unbilled charges to date will be billed to the previously
# associated account. The current authenticated user must be either an owner
# of the project or an owner of the billing account for the project.
# Note that associating a project with a *closed* billing account will have
# much the same effect as disabling billing on the project: any paid
# resources used by the project will be shut down. Thus, unless you wish to
# disable billing, you should always call this method with the name of an
# *open* billing account.
# @param [String] name # @param [String] name
# The resource name of the billing account to retrieve. For example, ` # The resource name of the project associated with the billing information
# billingAccounts/012345-567890-ABCDEF`. # that you want to update. For example, `projects/tokyo-rain-123`.
# @param [String] fields # @param [Google::Apis::CloudbillingV1::ProjectBillingInfo] project_billing_info_object
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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::CloudbillingV1::ProjectBillingInfo] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_billing_info(name, project_billing_info_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v1/{+name}/billingInfo', options)
command.request_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
command.request_object = project_billing_info_object
command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
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
# Gets the billing information for a project. The current authenticated user
# must have [permission to view the
# project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
# ).
# @param [String] name
# The resource name of the project for which billing information is
# retrieved. For example, `projects/tokyo-rain-123`.
# @param [String] quota_user
# Available to 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::CloudbillingV1::ProjectBillingInfo] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_billing_info(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}/billingInfo', options)
command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
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
# Gets information about a billing account. The current authenticated user
# must be an [owner of the billing
# account](https://support.google.com/cloud/answer/4430947).
# @param [String] name
# The resource name of the billing account to retrieve. For example,
# `billingAccounts/012345-567890-ABCDEF`.
# @param [String] quota_user
# Available to 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -70,29 +164,30 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def get_billing_account(name, fields: nil, quota_user: nil, options: nil, &block) def get_billing_account(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options) command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation command.response_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation
command.response_class = Google::Apis::CloudbillingV1::BillingAccount command.response_class = Google::Apis::CloudbillingV1::BillingAccount
command.params['name'] = name unless name.nil? 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Lists the billing accounts that the current authenticated user [owns](https:// # Lists the billing accounts that the current authenticated user
# support.google.com/cloud/answer/4430947). # [owns](https://support.google.com/cloud/answer/4430947).
# @param [Fixnum] page_size # @param [Fixnum] page_size
# Requested page size. The maximum page size is 100; this is also the default. # Requested page size. The maximum page size is 100; this is also the
# default.
# @param [String] page_token # @param [String] page_token
# A token identifying a page of results to return. This should be a ` # A token identifying a page of results to return. This should be a
# next_page_token` value returned from a previous `ListBillingAccounts` call. If # `next_page_token` value returned from a previous `ListBillingAccounts`
# unspecified, the first page of results is returned. # call. If unspecified, the first page of results is returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -105,34 +200,35 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def list_billing_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) def list_billing_accounts(page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/billingAccounts', options) command = make_simple_command(:get, 'v1/billingAccounts', options)
command.response_representation = Google::Apis::CloudbillingV1::ListBillingAccountsResponse::Representation command.response_representation = Google::Apis::CloudbillingV1::ListBillingAccountsResponse::Representation
command.response_class = Google::Apis::CloudbillingV1::ListBillingAccountsResponse command.response_class = Google::Apis::CloudbillingV1::ListBillingAccountsResponse
command.query['pageSize'] = page_size unless page_size.nil? command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Lists the projects associated with a billing account. The current # Lists the projects associated with a billing account. The current
# authenticated user must be an [owner of the billing account](https://support. # authenticated user must be an [owner of the billing
# google.com/cloud/answer/4430947). # account](https://support.google.com/cloud/answer/4430947).
# @param [String] name # @param [String] name
# The resource name of the billing account associated with the projects that you # The resource name of the billing account associated with the projects that
# want to list. For example, `billingAccounts/012345-567890-ABCDEF`. # you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
# @param [Fixnum] page_size # @param [Fixnum] page_size
# Requested page size. The maximum page size is 100; this is also the default. # Requested page size. The maximum page size is 100; this is also the
# default.
# @param [String] page_token # @param [String] page_token
# A token identifying a page of results to be returned. This should be a ` # A token identifying a page of results to be returned. This should be a
# next_page_token` value returned from a previous `ListProjectBillingInfo` call. # `next_page_token` value returned from a previous `ListProjectBillingInfo`
# If unspecified, the first page of results is returned. # call. If unspecified, the first page of results is returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -145,104 +241,15 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def list_billing_account_projects(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) def list_billing_account_projects(name, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}/projects', options) command = make_simple_command(:get, 'v1/{+name}/projects', options)
command.response_representation = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse::Representation command.response_representation = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse::Representation
command.response_class = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse command.response_class = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse
command.params['name'] = name unless name.nil? command.params['name'] = name unless name.nil?
command.query['pageSize'] = page_size unless page_size.nil? command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.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['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the billing information for a project. The current authenticated user
# must have [permission to view the project](https://cloud.google.com/docs/
# permissions-overview#h.bgs0oxofvnoo ).
# @param [String] name
# The resource name of the project for which billing information is retrieved.
# For example, `projects/tokyo-rain-123`.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbillingV1::ProjectBillingInfo] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_billing_info(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}/billingInfo', options)
command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.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 or updates the billing account associated with a project. You specify the
# new billing account by setting the `billing_account_name` in the `
# ProjectBillingInfo` resource to the resource name of a billing account.
# Associating a project with an open billing account enables billing on the
# project and allows charges for resource usage. If the project already had a
# billing account, this method changes the billing account used for resource
# usage charges. *Note:* Incurred charges that have not yet been reported in the
# transaction history of the Google Developers Console may be billed to the new
# billing account, even if the charge occurred before the new billing account
# was assigned to the project. The current authenticated user must have
# ownership privileges for both the [project](https://cloud.google.com/docs/
# permissions-overview#h.bgs0oxofvnoo ) and the [billing account](https://
# support.google.com/cloud/answer/4430947). You can disable billing on the
# project by setting the `billing_account_name` field to empty. This action
# disassociates the current billing account from the project. Any billable
# activity of your in-use services will stop, and your application could stop
# functioning as expected. Any unbilled charges to date will be billed to the
# previously associated account. The current authenticated user must be either
# an owner of the project or an owner of the billing account for the project.
# Note that associating a project with a *closed* billing account will have much
# the same effect as disabling billing on the project: any paid resources used
# by the project will be shut down. Thus, unless you wish to disable billing,
# you should always call this method with the name of an *open* billing account.
# @param [String] name
# The resource name of the project associated with the billing information that
# you want to update. For example, `projects/tokyo-rain-123`.
# @param [Google::Apis::CloudbillingV1::ProjectBillingInfo] project_billing_info_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::CloudbillingV1::ProjectBillingInfo] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_billing_info(name, project_billing_info_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1/{+name}/billingInfo', options)
command.request_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
command.request_object = project_billing_info_object
command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
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) execute_or_queue_command(command, &block)
end end

View File

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

View File

@ -22,6 +22,122 @@ module Google
module Apis module Apis
module CloudbuildV1 module CloudbuildV1
# This resource represents a long-running operation that is the result of a
# network API call.
class Operation
include Google::Apis::Core::Hashable
# If the value is `false`, it means the operation is still in progress.
# If true, the operation is completed, and either `error` or `response` is
# available.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done
# The normal response of the operation in case of success. If the original
# method returns no data on success, such as `Delete`, the response is
# `google.protobuf.Empty`. If the original method is standard
# `Get`/`Create`/`Update`, the response should be the resource. For other
# methods, the response should have the type `XxxResponse`, where `Xxx`
# is the original method name. For example, if the original method name
# is `TakeSnapshot()`, the inferred response type is
# `TakeSnapshotResponse`.
# Corresponds to the JSON property `response`
# @return [Hash<String,Object>]
attr_accessor :response
# The server-assigned name, which is only unique within the same service that
# originally returns it. If you use the default HTTP mapping, the
# `name` should have the format of `operations/some/unique/name`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# 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:
# - Simple to use and understand for most users
# - Flexible enough to meet unexpected needs
# # Overview
# The `Status` message contains three pieces of data: error code, error message,
# and error details. The error code should be an enum value of
# google.rpc.Code, but it may accept additional error codes if needed. The
# error message should be a developer-facing English message that helps
# developers *understand* and *resolve* the error. If a localized user-facing
# error message is needed, put the localized message in the error details or
# localize it in the client. The optional error details may contain arbitrary
# information about the error. There is a predefined set of error detail types
# in the package `google.rpc` which can be used for common error conditions.
# # Language mapping
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C.
# # Other uses
# The error model and the `Status` message can be used in a variety of
# environments, either with or without APIs, to provide a
# consistent developer experience across different environments.
# Example uses of this error model include:
# - Partial errors. If a service needs to return partial errors to the client,
# it may embed the `Status` in the normal response to indicate the partial
# errors.
# - Workflow errors. A typical workflow has multiple steps. Each step may
# have a `Status` message for error reporting purpose.
# - Batch operations. If a client uses batch request and batch response, the
# `Status` message should be used directly inside batch response, one for
# each error sub-response.
# - Asynchronous operations. If an API call embeds asynchronous operation
# results in its response, the status of those operations should be
# represented directly using the `Status` message.
# - Logging. If some API errors are stored in logs, the message `Status` could
# be used directly after any stripping needed for security/privacy reasons.
# Corresponds to the JSON property `error`
# @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)
@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
# 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
# BuiltImage describes an image built by the pipeline. # BuiltImage describes an image built by the pipeline.
class BuiltImage class BuiltImage
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -97,18 +213,6 @@ module Google
class BuildStep class BuildStep
include Google::Apis::Core::Hashable 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 # Working directory (relative to project source root) to use when running
# this operation's container. # this operation's container.
# Corresponds to the JSON property `dir` # Corresponds to the JSON property `dir`
@ -157,19 +261,31 @@ module Google
# @return [String] # @return [String]
attr_accessor :name 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
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@entrypoint = args[:entrypoint] if args.key?(:entrypoint)
@id = args[:id] if args.key?(:id)
@dir = args[:dir] if args.key?(:dir) @dir = args[:dir] if args.key?(:dir)
@wait_for = args[:wait_for] if args.key?(:wait_for) @wait_for = args[:wait_for] if args.key?(:wait_for)
@env = args[:env] if args.key?(:env) @env = args[:env] if args.key?(:env)
@args = args[:args] if args.key?(:args) @args = args[:args] if args.key?(:args)
@name = args[:name] if args.key?(:name) @name = args[:name] if args.key?(:name)
@entrypoint = args[:entrypoint] if args.key?(:entrypoint)
@id = args[:id] if args.key?(:id)
end end
end end
@ -177,24 +293,24 @@ module Google
class HashProp class HashProp
include Google::Apis::Core::Hashable 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. # The hash value.
# Corresponds to the JSON property `value` # Corresponds to the JSON property `value`
# @return [String] # @return [String]
attr_accessor :value attr_accessor :value
# The type of hash that was performed.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@type = args[:type] if args.key?(:type)
@value = args[:value] if args.key?(:value) @value = args[:value] if args.key?(:value)
@type = args[:type] if args.key?(:type)
end end
end end
@ -260,13 +376,6 @@ module Google
class Status class Status
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# A developer-facing error message, which should be in English. Any
# user-facing error message should be localized and sent in the
# google.rpc.Status.details field, or localized by the client.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
# A list of messages that carry the error details. There will be a # A list of messages that carry the error details. There will be a
# common set of message types for APIs to use. # common set of message types for APIs to use.
# Corresponds to the JSON property `details` # Corresponds to the JSON property `details`
@ -278,15 +387,22 @@ module Google
# @return [Fixnum] # @return [Fixnum]
attr_accessor :code attr_accessor :code
# A developer-facing error message, which should be in English. Any
# user-facing error message should be localized and sent in the
# google.rpc.Status.details field, or localized by the client.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@message = args[:message] if args.key?(:message)
@details = args[:details] if args.key?(:details) @details = args[:details] if args.key?(:details)
@code = args[:code] if args.key?(:code) @code = args[:code] if args.key?(:code)
@message = args[:message] if args.key?(:message)
end end
end end
@ -314,6 +430,18 @@ module Google
class BuildTrigger class BuildTrigger
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# 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
# Unique identifier of the trigger. # Unique identifier of the trigger.
# @OutputOnly # @OutputOnly
# Corresponds to the JSON property `id` # Corresponds to the JSON property `id`
@ -347,29 +475,17 @@ module Google
# @return [String] # @return [String]
attr_accessor :description attr_accessor :description
# Time when the trigger was created.
# @OutputOnly
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# If true, the trigger will never result in a build. # If true, the trigger will never result in a build.
# Corresponds to the JSON property `disabled` # Corresponds to the JSON property `disabled`
# @return [Boolean] # @return [Boolean]
attr_accessor :disabled attr_accessor :disabled
alias_method :disabled?, :disabled alias_method :disabled?, :disabled
# RepoSource describes the location of the source in a Google Cloud Source # Time when the trigger was created.
# Repository. # @OutputOnly
# Corresponds to the JSON property `triggerTemplate` # Corresponds to the JSON property `createTime`
# @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] # @return [String]
attr_accessor :filename attr_accessor :create_time
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
@ -377,14 +493,14 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@filename = args[:filename] if args.key?(:filename)
@trigger_template = args[:trigger_template] if args.key?(:trigger_template)
@id = args[:id] if args.key?(:id) @id = args[:id] if args.key?(:id)
@build = args[:build] if args.key?(:build) @build = args[:build] if args.key?(:build)
@substitutions = args[:substitutions] if args.key?(:substitutions) @substitutions = args[:substitutions] if args.key?(:substitutions)
@description = args[:description] if args.key?(:description) @description = args[:description] if args.key?(:description)
@create_time = args[:create_time] if args.key?(:create_time)
@disabled = args[:disabled] if args.key?(:disabled) @disabled = args[:disabled] if args.key?(:disabled)
@trigger_template = args[:trigger_template] if args.key?(:trigger_template) @create_time = args[:create_time] if args.key?(:create_time)
@filename = args[:filename] if args.key?(:filename)
end end
end end
@ -404,6 +520,29 @@ module Google
class Build class Build
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Source describes the location of the source in a supported storage
# service.
# Corresponds to the JSON property `source`
# @return [Google::Apis::CloudbuildV1::Source]
attr_accessor :source
# Optional arguments to enable specific features of builds.
# Corresponds to the JSON property `options`
# @return [Google::Apis::CloudbuildV1::BuildOptions]
attr_accessor :options
# 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 # 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 # granularity. If this amount of time elapses, work on the build will cease
# and the build status will be TIMEOUT. # and the build status will be TIMEOUT.
@ -412,17 +551,10 @@ module Google
# @return [String] # @return [String]
attr_accessor :timeout attr_accessor :timeout
# Status of the build. # Results describes the artifacts created by the build pipeline.
# @OutputOnly # Corresponds to the JSON property `results`
# Corresponds to the JSON property `status` # @return [Google::Apis::CloudbuildV1::Results]
# @return [String] attr_accessor :results
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 # Google Cloud Storage bucket where logs should be written (see
# [Bucket Name # [Bucket Name
@ -433,11 +565,6 @@ module Google
# @return [String] # @return [String]
attr_accessor :logs_bucket 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. # Describes the operations to be performed on the workspace.
# Corresponds to the JSON property `steps` # Corresponds to the JSON property `steps`
# @return [Array<Google::Apis::CloudbuildV1::BuildStep>] # @return [Array<Google::Apis::CloudbuildV1::BuildStep>]
@ -456,16 +583,22 @@ module Google
# @return [String] # @return [String]
attr_accessor :id 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. # Time at which execution of the build was started.
# @OutputOnly # @OutputOnly
# Corresponds to the JSON property `startTime` # Corresponds to the JSON property `startTime`
# @return [String] # @return [String]
attr_accessor :start_time attr_accessor :start_time
# Substitutions data for Build resource. # Provenance of the source. Ways to find the original source, or verify that
# Corresponds to the JSON property `substitutions` # some source was used for this build.
# @return [Hash<String,String>] # Corresponds to the JSON property `sourceProvenance`
attr_accessor :substitutions # @return [Google::Apis::CloudbuildV1::SourceProvenance]
attr_accessor :source_provenance
# Time at which the request to create the build was received. # Time at which the request to create the build was received.
# @OutputOnly # @OutputOnly
@ -473,12 +606,6 @@ module Google
# @return [String] # @return [String]
attr_accessor :create_time attr_accessor :create_time
# Provenance of the source. Ways to find the original source, or verify that
# some source was used for this build.
# Corresponds to the JSON property `sourceProvenance`
# @return [Google::Apis::CloudbuildV1::SourceProvenance]
attr_accessor :source_provenance
# A list of images to be pushed upon the successful completion of all build # A list of images to be pushed upon the successful completion of all build
# steps. # steps.
# The images will be pushed using the builder service account's credentials. # The images will be pushed using the builder service account's credentials.
@ -509,41 +636,30 @@ module Google
# @return [String] # @return [String]
attr_accessor :log_url attr_accessor :log_url
# Source describes the location of the source in a supported storage
# service.
# Corresponds to the JSON property `source`
# @return [Google::Apis::CloudbuildV1::Source]
attr_accessor :source
# 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) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@timeout = args[:timeout] if args.key?(:timeout) @source = args[:source] if args.key?(:source)
@status = args[:status] if args.key?(:status) @options = args[:options] if args.key?(:options)
@status_detail = args[:status_detail] if args.key?(:status_detail) @status_detail = args[:status_detail] if args.key?(:status_detail)
@logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket) @status = args[:status] if args.key?(:status)
@timeout = args[:timeout] if args.key?(:timeout)
@results = args[:results] if args.key?(:results) @results = args[:results] if args.key?(:results)
@logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
@steps = args[:steps] if args.key?(:steps) @steps = args[:steps] if args.key?(:steps)
@build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id) @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id)
@id = args[:id] if args.key?(:id) @id = args[:id] if args.key?(:id)
@start_time = args[:start_time] if args.key?(:start_time)
@substitutions = args[:substitutions] if args.key?(:substitutions) @substitutions = args[:substitutions] if args.key?(:substitutions)
@create_time = args[:create_time] if args.key?(:create_time) @start_time = args[:start_time] if args.key?(:start_time)
@source_provenance = args[:source_provenance] if args.key?(:source_provenance) @source_provenance = args[:source_provenance] if args.key?(:source_provenance)
@create_time = args[:create_time] if args.key?(:create_time)
@images = args[:images] if args.key?(:images) @images = args[:images] if args.key?(:images)
@project_id = args[:project_id] if args.key?(:project_id) @project_id = args[:project_id] if args.key?(:project_id)
@finish_time = args[:finish_time] if args.key?(:finish_time) @finish_time = args[:finish_time] if args.key?(:finish_time)
@log_url = args[:log_url] if args.key?(:log_url) @log_url = args[:log_url] if args.key?(:log_url)
@source = args[:source] if args.key?(:source)
@options = args[:options] if args.key?(:options)
end end
end end
@ -615,26 +731,26 @@ module Google
class Source class Source
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# 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 # StorageSource describes the location of the source in an archive file in
# Google Cloud Storage. # Google Cloud Storage.
# Corresponds to the JSON property `storageSource` # Corresponds to the JSON property `storageSource`
# @return [Google::Apis::CloudbuildV1::StorageSource] # @return [Google::Apis::CloudbuildV1::StorageSource]
attr_accessor :storage_source 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
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@repo_source = args[:repo_source] if args.key?(:repo_source)
@storage_source = args[:storage_source] if args.key?(:storage_source) @storage_source = args[:storage_source] if args.key?(:storage_source)
@repo_source = args[:repo_source] if args.key?(:repo_source)
end end
end end
@ -642,24 +758,24 @@ module Google
class BuildOptions class BuildOptions
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Requested verifiability options.
# Corresponds to the JSON property `requestedVerifyOption`
# @return [String]
attr_accessor :requested_verify_option
# Requested hash for SourceProvenance. # Requested hash for SourceProvenance.
# Corresponds to the JSON property `sourceProvenanceHash` # Corresponds to the JSON property `sourceProvenanceHash`
# @return [Array<String>] # @return [Array<String>]
attr_accessor :source_provenance_hash attr_accessor :source_provenance_hash
# Requested verifiability options.
# Corresponds to the JSON property `requestedVerifyOption`
# @return [String]
attr_accessor :requested_verify_option
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@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) @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)
end end
end end
@ -668,6 +784,12 @@ module Google
class StorageSource class StorageSource
include Google::Apis::Core::Hashable 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 # Google Cloud Storage bucket containing source (see
# [Bucket Name # [Bucket Name
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
@ -683,21 +805,15 @@ module Google
# @return [String] # @return [String]
attr_accessor :object 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) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@generation = args[:generation] if args.key?(:generation)
@bucket = args[:bucket] if args.key?(:bucket) @bucket = args[:bucket] if args.key?(:bucket)
@object = args[:object] if args.key?(:object) @object = args[:object] if args.key?(:object)
@generation = args[:generation] if args.key?(:generation)
end end
end end
@ -705,24 +821,24 @@ module Google
class Results class Results
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# 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. # Images that were built as a part of the build.
# Corresponds to the JSON property `images` # Corresponds to the JSON property `images`
# @return [Array<Google::Apis::CloudbuildV1::BuiltImage>] # @return [Array<Google::Apis::CloudbuildV1::BuiltImage>]
attr_accessor :images 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
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@build_step_images = args[:build_step_images] if args.key?(:build_step_images)
@images = args[:images] if args.key?(:images) @images = args[:images] if args.key?(:images)
@build_step_images = args[:build_step_images] if args.key?(:build_step_images)
end end
end end
@ -762,12 +878,6 @@ module Google
class SourceProvenance class SourceProvenance
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# RepoSource describes the location of the source in a Google Cloud Source
# Repository.
# Corresponds to the JSON property `resolvedRepoSource`
# @return [Google::Apis::CloudbuildV1::RepoSource]
attr_accessor :resolved_repo_source
# StorageSource describes the location of the source in an archive file in # StorageSource describes the location of the source in an archive file in
# Google Cloud Storage. # Google Cloud Storage.
# Corresponds to the JSON property `resolvedStorageSource` # Corresponds to the JSON property `resolvedStorageSource`
@ -786,15 +896,21 @@ module Google
# @return [Hash<String,Google::Apis::CloudbuildV1::FileHashes>] # @return [Hash<String,Google::Apis::CloudbuildV1::FileHashes>]
attr_accessor :file_hashes attr_accessor :file_hashes
# RepoSource describes the location of the source in a Google Cloud Source
# Repository.
# Corresponds to the JSON property `resolvedRepoSource`
# @return [Google::Apis::CloudbuildV1::RepoSource]
attr_accessor :resolved_repo_source
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@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) @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
@file_hashes = args[:file_hashes] if args.key?(:file_hashes) @file_hashes = args[:file_hashes] if args.key?(:file_hashes)
@resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
end end
end end
@ -810,122 +926,6 @@ module Google
def update!(**args) def update!(**args)
end end
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.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done
# The normal response of the operation in case of success. If the original
# method returns no data on success, such as `Delete`, the response is
# `google.protobuf.Empty`. If the original method is standard
# `Get`/`Create`/`Update`, the response should be the resource. For other
# methods, the response should have the type `XxxResponse`, where `Xxx`
# is the original method name. For example, if the original method name
# is `TakeSnapshot()`, the inferred response type is
# `TakeSnapshotResponse`.
# Corresponds to the JSON property `response`
# @return [Hash<String,Object>]
attr_accessor :response
# The server-assigned name, which is only unique within the same service that
# originally returns it. If you use the default HTTP mapping, the
# `name` should have the format of `operations/some/unique/name`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# 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:
# - Simple to use and understand for most users
# - Flexible enough to meet unexpected needs
# # Overview
# The `Status` message contains three pieces of data: error code, error message,
# and error details. The error code should be an enum value of
# google.rpc.Code, but it may accept additional error codes if needed. The
# error message should be a developer-facing English message that helps
# developers *understand* and *resolve* the error. If a localized user-facing
# error message is needed, put the localized message in the error details or
# localize it in the client. The optional error details may contain arbitrary
# information about the error. There is a predefined set of error detail types
# in the package `google.rpc` which can be used for common error conditions.
# # Language mapping
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C.
# # Other uses
# The error model and the `Status` message can be used in a variety of
# environments, either with or without APIs, to provide a
# consistent developer experience across different environments.
# Example uses of this error model include:
# - Partial errors. If a service needs to return partial errors to the client,
# it may embed the `Status` in the normal response to indicate the partial
# errors.
# - Workflow errors. A typical workflow has multiple steps. Each step may
# have a `Status` message for error reporting purpose.
# - Batch operations. If a client uses batch request and batch response, the
# `Status` message should be used directly inside batch response, one for
# each error sub-response.
# - Asynchronous operations. If an API call embeds asynchronous operation
# results in its response, the status of those operations should be
# represented directly using the `Status` message.
# - Logging. If some API errors are stored in logs, the message `Status` could
# be used directly after any stripping needed for security/privacy reasons.
# Corresponds to the JSON property `error`
# @return [Google::Apis::CloudbuildV1::Status]
attr_accessor :error
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)
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
end end
end end
end end

View File

@ -22,6 +22,18 @@ module Google
module Apis module Apis
module CloudbuildV1 module CloudbuildV1
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListBuildTriggersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BuiltImage class BuiltImage
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -137,15 +149,23 @@ module Google
end end
class Operation class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end # @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
include Google::Apis::Core::JsonObjectSupport hash :metadata, as: 'metadata'
end
end end
class ListBuildTriggersResponse class ListBuildTriggersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end # @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :triggers, as: 'triggers', class: Google::Apis::CloudbuildV1::BuildTrigger, decorator: Google::Apis::CloudbuildV1::BuildTrigger::Representation
include Google::Apis::Core::JsonObjectSupport end
end end
class BuiltImage class BuiltImage
@ -170,21 +190,21 @@ module Google
class BuildStep class BuildStep
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :entrypoint, as: 'entrypoint'
property :id, as: 'id'
property :dir, as: 'dir' property :dir, as: 'dir'
collection :wait_for, as: 'waitFor' collection :wait_for, as: 'waitFor'
collection :env, as: 'env' collection :env, as: 'env'
collection :args, as: 'args' collection :args, as: 'args'
property :name, as: 'name' property :name, as: 'name'
property :entrypoint, as: 'entrypoint'
property :id, as: 'id'
end end
end end
class HashProp class HashProp
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value, :base64 => true, as: 'value' property :value, :base64 => true, as: 'value'
property :type, as: 'type'
end end
end end
@ -199,9 +219,9 @@ module Google
class Status class Status
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :message, as: 'message'
collection :details, as: 'details' collection :details, as: 'details'
property :code, as: 'code' property :code, as: 'code'
property :message, as: 'message'
end end
end end
@ -214,45 +234,45 @@ module Google
class BuildTrigger class BuildTrigger
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :filename, as: 'filename'
property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation
property :id, as: 'id' property :id, as: 'id'
property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation
hash :substitutions, as: 'substitutions' hash :substitutions, as: 'substitutions'
property :description, as: 'description' property :description, as: 'description'
property :create_time, as: 'createTime'
property :disabled, as: 'disabled' property :disabled, as: 'disabled'
property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation property :create_time, as: 'createTime'
property :filename, as: 'filename'
end end
end end
class Build class Build
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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'
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 :finish_time, as: 'finishTime'
property :log_url, as: 'logUrl'
property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation
property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation
property :status_detail, as: 'statusDetail'
property :status, as: 'status'
property :timeout, as: 'timeout'
property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation
property :logs_bucket, as: 'logsBucket'
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'
property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation
property :create_time, as: 'createTime'
collection :images, as: 'images'
property :project_id, as: 'projectId'
property :finish_time, as: 'finishTime'
property :log_url, as: 'logUrl'
end end
end end
@ -283,36 +303,36 @@ module Google
class Source class Source
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
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 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
end end
end end
class BuildOptions class BuildOptions
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :requested_verify_option, as: 'requestedVerifyOption'
collection :source_provenance_hash, as: 'sourceProvenanceHash' collection :source_provenance_hash, as: 'sourceProvenanceHash'
property :requested_verify_option, as: 'requestedVerifyOption'
end end
end end
class StorageSource class StorageSource
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :generation, as: 'generation'
property :bucket, as: 'bucket' property :bucket, as: 'bucket'
property :object, as: 'object' property :object, as: 'object'
property :generation, as: 'generation'
end end
end end
class Results class Results
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 :images, as: 'images', class: Google::Apis::CloudbuildV1::BuiltImage, decorator: Google::Apis::CloudbuildV1::BuiltImage::Representation
collection :build_step_images, as: 'buildStepImages'
end end
end end
@ -327,12 +347,12 @@ module Google
class SourceProvenance class SourceProvenance
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
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 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 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
end end
end end
@ -341,26 +361,6 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
end end
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
collection :triggers, as: 'triggers', class: Google::Apis::CloudbuildV1::BuildTrigger, decorator: Google::Apis::CloudbuildV1::BuildTrigger::Representation
end
end
end end
end end
end end

View File

@ -32,20 +32,338 @@ module Google
# #
# @see https://cloud.google.com/container-builder/docs/ # @see https://cloud.google.com/container-builder/docs/
class CloudBuildService < Google::Apis::Core::BaseService class CloudBuildService < 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] # @return [String]
# API key. Your API key identifies your project and provides you with API access, # 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. # quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key 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 def initialize
super('https://cloudbuild.googleapis.com/', '') super('https://cloudbuild.googleapis.com/', '')
end end
# Starts a build with the specified configuration.
# The long-running Operation returned by this method will include the ID of
# the build, which can be passed to GetBuild to determine its status (e.g.,
# success or failure).
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::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_build(project_id, build_object = nil, fields: nil, quota_user: 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?
execute_or_queue_command(command, &block)
end
# Cancels a requested build in progress.
# @param [String] project_id
# ID of the project.
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::Build]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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)
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
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?
execute_or_queue_command(command, &block)
end
# Returns information about a previously requested build.
# The Build that is returned includes its status (e.g., success or failure,
# or in-progress), and timing information.
# @param [String] project_id
# 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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::Build]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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)
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?
execute_or_queue_command(command, &block)
end
# Lists previously requested builds.
# Previously requested builds may still be in-progress, or may have finished
# successfully or unsuccessfully.
# @param [String] project_id
# ID of the project.
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::ListBuildsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::ListBuildsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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)
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['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
# Deletes an BuildTrigger by its project ID and trigger ID.
# This API is experimental.
# @param [String] project_id
# 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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::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_trigger(project_id, trigger_id, fields: nil, quota_user: 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?
execute_or_queue_command(command, &block)
end
# Gets information about a BuildTrigger.
# This API is experimental.
# @param [String] project_id
# 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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::BuildTrigger] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::BuildTrigger]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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)
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?
execute_or_queue_command(command, &block)
end
# Lists existing BuildTrigger.
# 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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::ListBuildTriggersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::ListBuildTriggersResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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)
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?
execute_or_queue_command(command, &block)
end
# Updates an BuildTrigger by its project ID and trigger ID.
# This API is experimental.
# @param [String] project_id
# ID of the project that owns the trigger.
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::BuildTrigger] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::BuildTrigger]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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)
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
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?
execute_or_queue_command(command, &block)
end
# Creates a new BuildTrigger.
# This API is experimental.
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudbuildV1::BuildTrigger] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::BuildTrigger]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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)
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?
execute_or_queue_command(command, &block)
end
# Starts asynchronous cancellation on a long-running operation. The server # Starts asynchronous cancellation on a long-running operation. The server
# makes a best effort to cancel the operation, but success is not # makes a best effort to cancel the operation, but success is not
# guaranteed. If the server doesn't support this method, it returns # guaranteed. If the server doesn't support this method, it returns
@ -59,11 +377,11 @@ module Google
# @param [String] name # @param [String] name
# The name of the operation resource to be cancelled. # The name of the operation resource to be cancelled.
# @param [Google::Apis::CloudbuildV1::CancelOperationRequest] cancel_operation_request_object # @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 # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -76,15 +394,15 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:cancel', options) command = make_simple_command(:post, 'v1/{+name}:cancel', options)
command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation
command.request_object = cancel_operation_request_object command.request_object = cancel_operation_request_object
command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
command.response_class = Google::Apis::CloudbuildV1::Empty command.response_class = Google::Apis::CloudbuildV1::Empty
command.params['name'] = name unless name.nil? command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
@ -100,11 +418,11 @@ module Google
# The standard list page size. # The standard list page size.
# @param [String] filter # @param [String] filter
# The standard list filter. # The standard list filter.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -117,7 +435,7 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def list_operations(name, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: 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 = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation
command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse
@ -125,8 +443,8 @@ module Google
command.query['pageToken'] = page_token unless page_token.nil? command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil? command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil? command.query['filter'] = filter unless filter.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
@ -135,11 +453,11 @@ module Google
# service. # service.
# @param [String] name # @param [String] name
# The name of the operation resource. # The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -152,339 +470,21 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def get_operation(name, quota_user: nil, fields: nil, options: nil, &block) def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options) command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
command.response_class = Google::Apis::CloudbuildV1::Operation command.response_class = Google::Apis::CloudbuildV1::Operation
command.params['name'] = name unless name.nil? command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes an BuildTrigger by its project ID and trigger ID.
# This API is experimental.
# @param [String] project_id
# ID of the project that owns the trigger.
# @param [String] trigger_id
# ID of the BuildTrigger to delete.
# @param [String] quota_user
# Available to 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::CloudbuildV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::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_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['quotaUser'] = quota_user unless quota_user.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 information about a BuildTrigger.
# This API is experimental.
# @param [String] project_id
# ID of the project that owns the trigger.
# @param [String] trigger_id
# ID of the BuildTrigger to get.
# @param [String] quota_user
# Available to 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::CloudbuildV1::BuildTrigger] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::BuildTrigger]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists existing BuildTrigger.
# This API is experimental.
# @param [String] project_id
# ID of the project for which to list BuildTriggers.
# @param [String] quota_user
# Available to 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::CloudbuildV1::ListBuildTriggersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::ListBuildTriggersResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Updates an BuildTrigger by its project ID and trigger ID.
# This API is experimental.
# @param [String] project_id
# ID of the project that owns the trigger.
# @param [String] trigger_id
# ID of the BuildTrigger to update.
# @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_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::CloudbuildV1::BuildTrigger] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::BuildTrigger]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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
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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Creates a new BuildTrigger.
# This API is experimental.
# @param [String] project_id
# ID of the project for which to configure automatic builds.
# @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_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::CloudbuildV1::BuildTrigger] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::BuildTrigger]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Cancels a requested build in progress.
# @param [String] project_id
# ID of the project.
# @param [String] id
# ID of the build.
# @param [Google::Apis::CloudbuildV1::CancelBuildRequest] cancel_build_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::CloudbuildV1::Build] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::Build]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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
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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Returns information about a previously requested build.
# The Build that is returned includes its status (e.g., success or failure,
# or in-progress), and timing information.
# @param [String] project_id
# ID of the project.
# @param [String] id
# ID of the build.
# @param [String] quota_user
# Available to 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::CloudbuildV1::Build] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::Build]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists previously requested builds.
# Previously requested builds may still be in-progress, or may have finished
# 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] quota_user
# Available to 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::CloudbuildV1::ListBuildsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::ListBuildsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Starts a build with the specified configuration.
# The long-running Operation returned by this method will include the ID of
# the build, which can be passed to GetBuild to determine its status (e.g.,
# success or failure).
# @param [String] project_id
# ID of the project.
# @param [Google::Apis::CloudbuildV1::Build] build_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::CloudbuildV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudbuildV1::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_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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
protected protected
def apply_command_defaults(command) def apply_command_defaults(command)
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['key'] = key unless key.nil? command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end end
end end
end end

View File

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

View File

@ -22,6 +22,109 @@ module Google
module Apis module Apis
module ClouddebuggerV2 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 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
# 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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@repo_id = args[:repo_id] if args.key?(:repo_id)
@alias_context = args[:alias_context] if args.key?(:alias_context)
@revision_id = args[:revision_id] if args.key?(:revision_id)
@alias_name = args[:alias_name] if args.key?(:alias_name)
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. # Represents a contextual status message.
# The message can indicate an error or informational status, and refer to # The message can indicate an error or informational status, and refer to
# specific parts of the containing object. # specific parts of the containing object.
@ -170,6 +273,26 @@ module Google
class Variable class Variable
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Variable type (e.g. `MyClass`). If the variable is split with
# `var_table_index`, `type` goes next to `value`. The interpretation of
# a type is agent specific. It is recommended to include the dynamic type
# rather than a static type of an object.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# Simple value of the variable.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
# 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
# Members contained or pointed to by the variable. # Members contained or pointed to by the variable.
# Corresponds to the JSON property `members` # Corresponds to the JSON property `members`
# @return [Array<Google::Apis::ClouddebuggerV2::Variable>] # @return [Array<Google::Apis::ClouddebuggerV2::Variable>]
@ -189,38 +312,18 @@ module Google
# @return [String] # @return [String]
attr_accessor :name attr_accessor :name
# Variable type (e.g. `MyClass`). If the variable is split with
# `var_table_index`, `type` goes next to `value`. The interpretation of
# a type is agent specific. It is recommended to include the dynamic type
# rather than a static type of an object.
# Corresponds to the JSON property `type`
# @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) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@type = args[:type] if args.key?(:type)
@value = args[:value] if args.key?(:value)
@var_table_index = args[:var_table_index] if args.key?(:var_table_index)
@members = args[:members] if args.key?(:members) @members = args[:members] if args.key?(:members)
@status = args[:status] if args.key?(:status) @status = args[:status] if args.key?(:status)
@name = args[:name] if args.key?(:name) @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
end end
@ -228,12 +331,6 @@ module Google
class StackFrame class StackFrame
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Set of arguments passed to this function.
# Note that this might not be populated for all stack frames.
# Corresponds to the JSON property `arguments`
# @return [Array<Google::Apis::ClouddebuggerV2::Variable>]
attr_accessor :arguments
# Set of local variables at the stack frame location. # Set of local variables at the stack frame location.
# Note that this might not be populated for all stack frames. # Note that this might not be populated for all stack frames.
# Corresponds to the JSON property `locals` # Corresponds to the JSON property `locals`
@ -250,16 +347,22 @@ module Google
# @return [String] # @return [String]
attr_accessor :function attr_accessor :function
# Set of arguments passed to this function.
# Note that this might not be populated for all stack frames.
# Corresponds to the JSON property `arguments`
# @return [Array<Google::Apis::ClouddebuggerV2::Variable>]
attr_accessor :arguments
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@arguments = args[:arguments] if args.key?(:arguments)
@locals = args[:locals] if args.key?(:locals) @locals = args[:locals] if args.key?(:locals)
@location = args[:location] if args.key?(:location) @location = args[:location] if args.key?(:location)
@function = args[:function] if args.key?(:function) @function = args[:function] if args.key?(:function)
@arguments = args[:arguments] if args.key?(:arguments)
end end
end end
@ -267,25 +370,25 @@ module Google
class RepoId class RepoId
include Google::Apis::Core::Hashable 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 # Selects a repo using a Google Cloud Platform project ID
# (e.g. winged-cargo-31) and a repo name within that project. # (e.g. winged-cargo-31) and a repo name within that project.
# Corresponds to the JSON property `projectRepoId` # Corresponds to the JSON property `projectRepoId`
# @return [Google::Apis::ClouddebuggerV2::ProjectRepoId] # @return [Google::Apis::ClouddebuggerV2::ProjectRepoId]
attr_accessor :project_repo_id 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) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@uid = args[:uid] if args.key?(:uid)
@project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id) @project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id)
@uid = args[:uid] if args.key?(:uid)
end end
end end
@ -347,29 +450,6 @@ module Google
end end
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. # An alias to a repo revision.
class AliasContext class AliasContext
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -395,6 +475,29 @@ module Google
end end
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 # 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 # 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: # or the response type of an API method. For instance:
@ -418,24 +521,24 @@ module Google
class SourceLocation class SourceLocation
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Path to the source file within the source context of the target binary.
# Corresponds to the JSON property `path`
# @return [String]
attr_accessor :path
# Line inside the file. The first line in the file has the value `1`. # Line inside the file. The first line in the file has the value `1`.
# Corresponds to the JSON property `line` # Corresponds to the JSON property `line`
# @return [Fixnum] # @return [Fixnum]
attr_accessor :line attr_accessor :line
# Path to the source file within the source context of the target binary.
# Corresponds to the JSON property `path`
# @return [String]
attr_accessor :path
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@path = args[:path] if args.key?(:path)
@line = args[:line] if args.key?(:line) @line = args[:line] if args.key?(:line)
@path = args[:path] if args.key?(:path)
end end
end end
@ -447,43 +550,17 @@ module Google
class Debuggee class Debuggee
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# 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
# have a `category` label of `remote_repo`. Source snapshot source
# contexts have a `category` of `snapshot`.
# Corresponds to the JSON property `extSourceContexts`
# @return [Array<Google::Apis::ClouddebuggerV2::ExtendedSourceContext>]
attr_accessor :ext_source_contexts
# A set of custom debuggee properties, populated by the agent, to be
# displayed to the user.
# Corresponds to the JSON property `labels`
# @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.
# For example, the `Breakpoint.status` field can indicate an error referring
# to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.
# Corresponds to the JSON property `status`
# @return [Google::Apis::ClouddebuggerV2::StatusMessage]
attr_accessor :status
# Project the debuggee is associated with. # Project the debuggee is associated with.
# Use the project number when registering a Google Cloud Platform project. # Use the project number when registering a Google Cloud Platform project.
# Corresponds to the JSON property `project` # Corresponds to the JSON property `project`
# @return [String] # @return [String]
attr_accessor :project attr_accessor :project
# Unique identifier for the debuggee generated by the controller service.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# If set to `true`, indicates that the agent should disable itself and # If set to `true`, indicates that the agent should disable itself and
# detach from the debuggee. # detach from the debuggee.
# Corresponds to the JSON property `isDisabled` # Corresponds to the JSON property `isDisabled`
@ -498,11 +575,6 @@ module Google
# @return [String] # @return [String]
attr_accessor :agent_version 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. # Debuggee uniquifier within the project.
# Any string that identifies the application within the project can be used. # Any string that identifies the application within the project can be used.
# Including environment and version or build IDs is recommended. # Including environment and version or build IDs is recommended.
@ -526,23 +598,54 @@ module Google
# @return [Array<Google::Apis::ClouddebuggerV2::SourceContext>] # @return [Array<Google::Apis::ClouddebuggerV2::SourceContext>]
attr_accessor :source_contexts 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
# have a `category` label of `remote_repo`. Source snapshot source
# contexts have a `category` of `snapshot`.
# Corresponds to the JSON property `extSourceContexts`
# @return [Array<Google::Apis::ClouddebuggerV2::ExtendedSourceContext>]
attr_accessor :ext_source_contexts
# A set of custom debuggee properties, populated by the agent, to be
# displayed to the user.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Represents a contextual status message.
# The message can indicate an error or informational status, and refer to
# specific parts of the containing object.
# For example, the `Breakpoint.status` field can indicate an error referring
# to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.
# Corresponds to the JSON property `status`
# @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`
# @return [Boolean]
attr_accessor :is_inactive
alias_method :is_inactive?, :is_inactive
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@ext_source_contexts = args[:ext_source_contexts] if args.key?(:ext_source_contexts)
@labels = args[:labels] if args.key?(:labels)
@is_inactive = args[:is_inactive] if args.key?(:is_inactive)
@status = args[:status] if args.key?(:status)
@project = args[:project] if args.key?(:project) @project = args[:project] if args.key?(:project)
@id = args[:id] if args.key?(:id)
@is_disabled = args[:is_disabled] if args.key?(:is_disabled) @is_disabled = args[:is_disabled] if args.key?(:is_disabled)
@agent_version = args[:agent_version] if args.key?(:agent_version) @agent_version = args[:agent_version] if args.key?(:agent_version)
@id = args[:id] if args.key?(:id)
@uniquifier = args[:uniquifier] if args.key?(:uniquifier) @uniquifier = args[:uniquifier] if args.key?(:uniquifier)
@description = args[:description] if args.key?(:description) @description = args[:description] if args.key?(:description)
@source_contexts = args[:source_contexts] if args.key?(:source_contexts) @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)
end end
end end
@ -635,24 +738,22 @@ module Google
end end
end end
# Response for updating an active breakpoint.
# The message is defined to allow future extensions.
class UpdateActiveBreakpointResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# A SourceContext referring to a Gerrit project. # A SourceContext referring to a Gerrit project.
class GerritSourceContext class GerritSourceContext
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# The full project name within the host. Projects may be nested, so
# "project/subproject" is a valid project name.
# The "repo name" is hostURI/project.
# Corresponds to the JSON property `gerritProject`
# @return [String]
attr_accessor :gerrit_project
# An alias to a repo revision.
# Corresponds to the JSON property `aliasContext`
# @return [Google::Apis::ClouddebuggerV2::AliasContext]
attr_accessor :alias_context
# The URI of a running Gerrit instance. # The URI of a running Gerrit instance.
# Corresponds to the JSON property `hostUri` # Corresponds to the JSON property `hostUri`
# @return [String] # @return [String]
@ -668,17 +769,24 @@ module Google
# @return [String] # @return [String]
attr_accessor :alias_name attr_accessor :alias_name
# The full project name within the host. Projects may be nested, so def initialize(**args)
# "project/subproject" is a valid project name. update!(**args)
# The "repo name" is hostURI/project. end
# Corresponds to the JSON property `gerritProject`
# @return [String]
attr_accessor :gerrit_project
# An alias to a repo revision. # Update properties of this object
# Corresponds to the JSON property `aliasContext` def update!(**args)
# @return [Google::Apis::ClouddebuggerV2::AliasContext] @gerrit_project = args[:gerrit_project] if args.key?(:gerrit_project)
attr_accessor :alias_context @alias_context = args[:alias_context] if args.key?(:alias_context)
@host_uri = args[:host_uri] if args.key?(:host_uri)
@revision_id = args[:revision_id] if args.key?(:revision_id)
@alias_name = args[:alias_name] if args.key?(:alias_name)
end
end
# Response for updating an active breakpoint.
# The message is defined to allow future extensions.
class UpdateActiveBreakpointResponse
include Google::Apis::Core::Hashable
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
@ -686,11 +794,6 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@host_uri = args[:host_uri] if args.key?(:host_uri)
@revision_id = args[:revision_id] if args.key?(:revision_id)
@alias_name = args[:alias_name] if args.key?(:alias_name)
@gerrit_project = args[:gerrit_project] if args.key?(:gerrit_project)
@alias_context = args[:alias_context] if args.key?(:alias_context)
end end
end end
@ -726,12 +829,6 @@ module Google
class ListBreakpointsResponse class ListBreakpointsResponse
include Google::Apis::Core::Hashable 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. # List of breakpoints matching the request.
# The fields `id` and `location` are guaranteed to be set on each breakpoint. # The fields `id` and `location` are guaranteed to be set on each breakpoint.
# The fields: `stack_frames`, `evaluated_expressions` and `variable_table` # The fields: `stack_frames`, `evaluated_expressions` and `variable_table`
@ -740,14 +837,20 @@ module Google
# @return [Array<Google::Apis::ClouddebuggerV2::Breakpoint>] # @return [Array<Google::Apis::ClouddebuggerV2::Breakpoint>]
attr_accessor :breakpoints 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) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token)
@breakpoints = args[:breakpoints] if args.key?(:breakpoints) @breakpoints = args[:breakpoints] if args.key?(:breakpoints)
@next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token)
end end
end end
@ -755,59 +858,6 @@ module Google
class Breakpoint class Breakpoint
include Google::Apis::Core::Hashable 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. # List of read-only expressions to evaluate at the breakpoint location.
# The expressions are composed using expressions in the programming language # The expressions are composed using expressions in the programming language
# at the source location. If the breakpoint action is `LOG`, the evaluated # at the source location. If the breakpoint action is `LOG`, the evaluated
@ -871,19 +921,65 @@ module Google
# @return [String] # @return [String]
attr_accessor :log_level 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
# 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
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) 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) @expressions = args[:expressions] if args.key?(:expressions)
@evaluated_expressions = args[:evaluated_expressions] if args.key?(:evaluated_expressions) @evaluated_expressions = args[:evaluated_expressions] if args.key?(:evaluated_expressions)
@is_final_state = args[:is_final_state] if args.key?(:is_final_state) @is_final_state = args[:is_final_state] if args.key?(:is_final_state)
@ -893,6 +989,13 @@ module Google
@user_email = args[:user_email] if args.key?(:user_email) @user_email = args[:user_email] if args.key?(:user_email)
@action = args[:action] if args.key?(:action) @action = args[:action] if args.key?(:action)
@log_level = args[:log_level] if args.key?(:log_level) @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)
@log_message_format = args[:log_message_format] if args.key?(:log_message_format)
@create_time = args[:create_time] if args.key?(:create_time)
end end
end end
@ -939,6 +1042,12 @@ module Google
class SourceContext class SourceContext
include Google::Apis::Core::Hashable 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. # A SourceContext referring to a Gerrit project.
# Corresponds to the JSON property `gerrit` # Corresponds to the JSON property `gerrit`
# @return [Google::Apis::ClouddebuggerV2::GerritSourceContext] # @return [Google::Apis::ClouddebuggerV2::GerritSourceContext]
@ -955,125 +1064,16 @@ module Google
# @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext] # @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext]
attr_accessor :cloud_workspace 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) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@git = args[:git] if args.key?(:git)
@gerrit = args[:gerrit] if args.key?(:gerrit) @gerrit = args[:gerrit] if args.key?(:gerrit)
@cloud_repo = args[:cloud_repo] if args.key?(:cloud_repo) @cloud_repo = args[:cloud_repo] if args.key?(:cloud_repo)
@cloud_workspace = args[:cloud_workspace] if args.key?(:cloud_workspace) @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 end
end end

View File

@ -22,6 +22,30 @@ module Google
module Apis module Apis
module ClouddebuggerV2 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 StatusMessage
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -64,13 +88,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ListDebuggeesResponse class AliasContext
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class AliasContext class ListDebuggeesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -112,13 +136,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class UpdateActiveBreakpointResponse class GerritSourceContext
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class GerritSourceContext class UpdateActiveBreakpointResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -161,27 +185,39 @@ module Google
end end
class CloudRepoSourceContext class CloudRepoSourceContext
class Representation < Google::Apis::Core::JsonRepresentation; end # @private
class Representation < Google::Apis::Core::JsonRepresentation
property :repo_id, as: 'repoId', class: Google::Apis::ClouddebuggerV2::RepoId, decorator: Google::Apis::ClouddebuggerV2::RepoId::Representation
include Google::Apis::Core::JsonObjectSupport property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation
property :revision_id, as: 'revisionId'
property :alias_name, as: 'aliasName'
end end
class RegisterDebuggeeResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end end
class RegisterDebuggeeRequest class RegisterDebuggeeRequest
class Representation < Google::Apis::Core::JsonRepresentation; end # @private
class Representation < Google::Apis::Core::JsonRepresentation
property :debuggee, as: 'debuggee', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation
include Google::Apis::Core::JsonObjectSupport 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 end
class GetBreakpointResponse class GetBreakpointResponse
class Representation < Google::Apis::Core::JsonRepresentation; end # @private
class Representation < Google::Apis::Core::JsonRepresentation
property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
include Google::Apis::Core::JsonObjectSupport end
end end
class StatusMessage class StatusMessage
@ -205,36 +241,36 @@ module Google
class Variable class Variable
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value, as: 'value'
property :var_table_index, as: 'varTableIndex'
collection :members, as: 'members', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation 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 :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation
property :name, as: 'name' property :name, as: 'name'
property :type, as: 'type'
property :var_table_index, as: 'varTableIndex'
property :value, as: 'value'
end end
end end
class StackFrame class StackFrame
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :arguments, as: 'arguments', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation
collection :locals, as: 'locals', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation collection :locals, as: 'locals', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation
property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation
property :function, as: 'function' property :function, as: 'function'
collection :arguments, as: 'arguments', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation
end end
end end
class RepoId class RepoId
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 :project_repo_id, as: 'projectRepoId', class: Google::Apis::ClouddebuggerV2::ProjectRepoId, decorator: Google::Apis::ClouddebuggerV2::ProjectRepoId::Representation
property :uid, as: 'uid'
end end
end end
@ -255,14 +291,6 @@ module Google
end end
end end
class ListDebuggeesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :debuggees, as: 'debuggees', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation
end
end
class AliasContext class AliasContext
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -271,6 +299,14 @@ module Google
end end
end end
class ListDebuggeesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :debuggees, as: 'debuggees', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation
end
end
class Empty class Empty
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -280,28 +316,28 @@ module Google
class SourceLocation class SourceLocation
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :path, as: 'path'
property :line, as: 'line' property :line, as: 'line'
property :path, as: 'path'
end end
end end
class Debuggee class Debuggee
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
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 :project, as: 'project' property :project, as: 'project'
property :id, as: 'id'
property :is_disabled, as: 'isDisabled' property :is_disabled, as: 'isDisabled'
property :agent_version, as: 'agentVersion' property :agent_version, as: 'agentVersion'
property :id, as: 'id'
property :uniquifier, as: 'uniquifier' property :uniquifier, as: 'uniquifier'
property :description, as: 'description' property :description, as: 'description'
collection :source_contexts, as: 'sourceContexts', class: Google::Apis::ClouddebuggerV2::SourceContext, decorator: Google::Apis::ClouddebuggerV2::SourceContext::Representation 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 :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation
property :is_inactive, as: 'isInactive'
end end
end end
@ -332,21 +368,21 @@ module Google
end end
end end
class UpdateActiveBreakpointResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class GerritSourceContext class GerritSourceContext
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :host_uri, as: 'hostUri'
property :revision_id, as: 'revisionId'
property :alias_name, as: 'aliasName'
property :gerrit_project, as: 'gerritProject' property :gerrit_project, as: 'gerritProject'
property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation
property :host_uri, as: 'hostUri'
property :revision_id, as: 'revisionId'
property :alias_name, as: 'aliasName'
end
end
class UpdateActiveBreakpointResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end end
end end
@ -362,24 +398,15 @@ module Google
class ListBreakpointsResponse class ListBreakpointsResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation
property :next_wait_token, as: 'nextWaitToken'
end end
end end
class Breakpoint class Breakpoint
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 :expressions, as: 'expressions'
collection :evaluated_expressions, as: 'evaluatedExpressions', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation collection :evaluated_expressions, as: 'evaluatedExpressions', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation
@ -392,6 +419,15 @@ module Google
property :user_email, as: 'userEmail' property :user_email, as: 'userEmail'
property :action, as: 'action' property :action, as: 'action'
property :log_level, as: 'logLevel' 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 :log_message_format, as: 'logMessageFormat'
property :create_time, as: 'createTime'
end end
end end
@ -414,50 +450,14 @@ module Google
class SourceContext class SourceContext
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 :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_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 :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 end
end end

View File

@ -47,15 +47,147 @@ module Google
super('https://clouddebugger.googleapis.com/', '') super('https://clouddebugger.googleapis.com/', '')
end end
# Registers the debuggee with the controller service.
# All agents attached to the same application should call this method with
# the same request content to get back the same stable `debuggee_id`. Agents
# should call this method again whenever `google.rpc.Code.NOT_FOUND` is
# returned from any controller method.
# This allows the controller service to disable the agent or recover from any
# 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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns the list of all active breakpoints for the debuggee.
# The breakpoint specification (location, condition, and expression
# fields) is semantically immutable, although the field values may
# change. For example, an agent may update the location line number
# to reflect the actual line where the breakpoint was set, but this
# doesn't change the breakpoint semantics.
# This means that an agent does not need to check if a breakpoint has changed
# when it encounters the same breakpoint on a successive call.
# Moreover, an agent should remember the breakpoints that are completed
# until the controller removes them from the active list to avoid
# setting those breakpoints again.
# @param [String] debuggee_id
# Identifies the debuggee.
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates the breakpoint state or mutable fields.
# The entire Breakpoint message must be sent back to the controller
# service.
# Updates to active breakpoint fields are only allowed if the new value
# does not change the breakpoint specification. Updates to the `location`,
# `condition` and `expression` fields should not alter the breakpoint
# semantics. These may only make changes such as canonicalizing a value
# or snapping the location to the correct line of code.
# @param [String] debuggee_id
# Identifies the debuggee being debugged.
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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
command.response_representation = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse::Representation
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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists all the debuggees that the user can set breakpoints to. # 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 # @param [Boolean] include_inactive
# When set to `true`, the result includes all debuggees. Otherwise, the # When set to `true`, the result includes all debuggees. Otherwise, the
# result includes only debuggees that are active. # result includes only debuggees that are active.
# @param [String] project # @param [String] project
# Project number of a Google Cloud project whose debuggees to list. # 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 # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -73,13 +205,13 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def list_debugger_debuggees(include_inactive: nil, project: nil, client_version: nil, fields: nil, quota_user: nil, options: nil, &block) def list_debugger_debuggees(client_version: nil, include_inactive: nil, project: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/debugger/debuggees', options) command = make_simple_command(:get, 'v2/debugger/debuggees', options)
command.response_representation = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse::Representation command.response_representation = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse::Representation
command.response_class = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse 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['includeInactive'] = include_inactive unless include_inactive.nil?
command.query['project'] = project unless project.nil? command.query['project'] = project unless project.nil?
command.query['clientVersion'] = client_version unless client_version.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
@ -199,6 +331,17 @@ module Google
# Lists all breakpoints for the debuggee. # Lists all breakpoints for the debuggee.
# @param [String] debuggee_id # @param [String] debuggee_id
# ID of the debuggee whose breakpoints to list. # ID of the debuggee whose breakpoints to list.
# @param [String] wait_token
# A wait token that, if specified, blocks the call until the breakpoints
# list has changed, or a server selected timeout has expired. The value
# should be set from the last response. The error code
# `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which
# should be called again with the same `wait_token`.
# @param [String] action_value
# Only breakpoints with the specified action will pass the filter.
# @param [String] client_version
# The client version making the call.
# Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
# @param [Boolean] include_inactive # @param [Boolean] include_inactive
# When set to `true`, the response includes active and inactive # When set to `true`, the response includes active and inactive
# breakpoints. Otherwise, it includes only active breakpoints. # breakpoints. Otherwise, it includes only active breakpoints.
@ -208,17 +351,6 @@ module Google
# @param [Boolean] strip_results # @param [Boolean] strip_results
# This field is deprecated. The following fields are always stripped out of # This field is deprecated. The following fields are always stripped out of
# the result: `stack_frames`, `evaluated_expressions` and `variable_table`. # the result: `stack_frames`, `evaluated_expressions` and `variable_table`.
# @param [String] wait_token
# A wait token that, if specified, blocks the call until the breakpoints
# list has changed, or a server selected timeout has expired. The value
# should be set from the last response. The error code
# `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which
# should be called again with the same `wait_token`.
# @param [String] client_version
# The client version making the call.
# 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 # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -236,149 +368,17 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @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, fields: nil, quota_user: nil, options: nil, &block) def list_debugger_debuggee_breakpoints(debuggee_id, wait_token: nil, action_value: nil, client_version: nil, include_inactive: nil, include_all_users: nil, strip_results: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v2/debugger/debuggees/{debuggeeId}/breakpoints', options) command = make_simple_command(:get, 'v2/debugger/debuggees/{debuggeeId}/breakpoints', options)
command.response_representation = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse::Representation command.response_representation = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse::Representation
command.response_class = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse command.response_class = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse
command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil?
command.query['waitToken'] = wait_token unless wait_token.nil?
command.query['action.value'] = action_value unless action_value.nil?
command.query['clientVersion'] = client_version unless client_version.nil?
command.query['includeInactive'] = include_inactive unless include_inactive.nil? command.query['includeInactive'] = include_inactive unless include_inactive.nil?
command.query['includeAllUsers'] = include_all_users unless include_all_users.nil? command.query['includeAllUsers'] = include_all_users unless include_all_users.nil?
command.query['stripResults'] = strip_results unless strip_results.nil? command.query['stripResults'] = strip_results unless strip_results.nil?
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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Registers the debuggee with the controller service.
# All agents attached to the same application should call this method with
# the same request content to get back the same stable `debuggee_id`. Agents
# should call this method again whenever `google.rpc.Code.NOT_FOUND` is
# returned from any controller method.
# This allows the controller service to disable the agent or recover from any
# 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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns the list of all active breakpoints for the debuggee.
# The breakpoint specification (location, condition, and expression
# fields) is semantically immutable, although the field values may
# change. For example, an agent may update the location line number
# to reflect the actual line where the breakpoint was set, but this
# doesn't change the breakpoint semantics.
# This means that an agent does not need to check if a breakpoint has changed
# when it encounters the same breakpoint on a successive call.
# Moreover, an agent should remember the breakpoints that are completed
# until the controller removes them from the active list to avoid
# 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] 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::ClouddebuggerV2::ListActiveBreakpointsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['waitToken'] = wait_token unless wait_token.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
# Updates the breakpoint state or mutable fields.
# The entire Breakpoint message must be sent back to the controller
# service.
# Updates to active breakpoint fields are only allowed if the new value
# does not change the breakpoint specification. Updates to the `location`,
# `condition` and `expression` fields should not alter the breakpoint
# semantics. These may only make changes such as canonicalizing a value
# or snapping the location to the correct line of code.
# @param [String] debuggee_id
# Identifies the debuggee being debugged.
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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
command.response_representation = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse::Representation
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['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)

View File

@ -0,0 +1,35 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/cloudkms_v1/service.rb'
require 'google/apis/cloudkms_v1/classes.rb'
require 'google/apis/cloudkms_v1/representations.rb'
module Google
module Apis
# Google Cloud Key Management Service (KMS) API
#
# Manages encryption for your cloud services the same way you do on-premise. You
# can generate, use, rotate, and destroy AES256 encryption keys.
#
# @see https://cloud.google.com/kms/
module CloudkmsV1
VERSION = 'V1'
REVISION = '20170301'
# 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

@ -0,0 +1,448 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudkmsV1
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
include Google::Apis::Core::JsonObjectSupport
end
class TestIamPermissionsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
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
include Google::Apis::Core::JsonObjectSupport
end
class EncryptResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class KeyRing
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UpdateCryptoKeyPrimaryVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RestoreCryptoKeyVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DataAccessOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListKeyRingsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AuditConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CryptoKeyVersion
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CloudAuditOptions
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 EncryptRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListCryptoKeyVersionsResponse
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 DestroyCryptoKeyVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Rule
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CryptoKey
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
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
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :op, as: 'op'
property :svc, as: 'svc'
property :sys, as: 'sys'
property :value, as: 'value'
collection :values, as: 'values'
property :iam, as: 'iam'
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
class DecryptResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :plaintext, :base64 => true, as: 'plaintext'
end
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class ListLocationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :locations, as: 'locations', class: Google::Apis::CloudkmsV1::Location, decorator: Google::Apis::CloudkmsV1::Location::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, :base64 => true, as: 'etag'
property :iam_owned, as: 'iamOwned'
collection :rules, as: 'rules', class: Google::Apis::CloudkmsV1::Rule, decorator: Google::Apis::CloudkmsV1::Rule::Representation
property :version, as: 'version'
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudkmsV1::AuditConfig, decorator: Google::Apis::CloudkmsV1::AuditConfig::Representation
collection :bindings, as: 'bindings', class: Google::Apis::CloudkmsV1::Binding, decorator: Google::Apis::CloudkmsV1::Binding::Representation
end
end
class EncryptResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ciphertext, :base64 => true, as: 'ciphertext'
property :name, as: 'name'
end
end
class KeyRing
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :name, as: 'name'
end
end
class UpdateCryptoKeyPrimaryVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :crypto_key_version_id, as: 'cryptoKeyVersionId'
end
end
class RestoreCryptoKeyVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class DataAccessOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class ListKeyRingsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
property :total_size, as: 'totalSize'
collection :key_rings, as: 'keyRings', class: Google::Apis::CloudkmsV1::KeyRing, decorator: Google::Apis::CloudkmsV1::KeyRing::Representation
end
end
class AuditConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers'
property :service, as: 'service'
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudkmsV1::AuditLogConfig, decorator: Google::Apis::CloudkmsV1::AuditLogConfig::Representation
end
end
class CryptoKeyVersion
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :state, as: 'state'
property :name, as: 'name'
property :destroy_event_time, as: 'destroyEventTime'
property :destroy_time, as: 'destroyTime'
property :create_time, as: 'createTime'
end
end
class CloudAuditOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :members, as: 'members'
property :role, as: 'role'
end
end
class EncryptRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :plaintext, :base64 => true, as: 'plaintext'
property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData'
end
end
class ListCryptoKeyVersionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
property :total_size, as: 'totalSize'
collection :crypto_key_versions, as: 'cryptoKeyVersions', class: Google::Apis::CloudkmsV1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
end
end
class TestIamPermissionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class DestroyCryptoKeyVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Rule
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :not_in, as: 'notIn'
property :description, as: 'description'
collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1::Condition, decorator: Google::Apis::CloudkmsV1::Condition::Representation
collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1::LogConfig, decorator: Google::Apis::CloudkmsV1::LogConfig::Representation
collection :in, as: 'in'
collection :permissions, as: 'permissions'
property :action, as: 'action'
end
end
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::CloudkmsV1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
property :name, as: 'name'
end
end
class LogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :counter, as: 'counter', class: Google::Apis::CloudkmsV1::CounterOptions, decorator: Google::Apis::CloudkmsV1::CounterOptions::Representation
property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1::DataAccessOptions::Representation
property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1::CloudAuditOptions::Representation
end
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :update_mask, as: 'updateMask'
property :policy, as: 'policy', class: Google::Apis::CloudkmsV1::Policy, decorator: Google::Apis::CloudkmsV1::Policy::Representation
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
property :name, as: 'name'
property :location_id, as: 'locationId'
hash :metadata, as: 'metadata'
hash :labels, as: 'labels'
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::CloudkmsV1::CryptoKey, decorator: Google::Apis::CloudkmsV1::CryptoKey::Representation
property :total_size, as: 'totalSize'
end
end
end
end
end

View File

@ -0,0 +1,933 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudkmsV1
# Google Cloud Key Management Service (KMS) API
#
# Manages encryption for your cloud services the same way you do on-premise. You
# can generate, use, rotate, and destroy AES256 encryption keys.
#
# @example
# require 'google/apis/cloudkms_v1'
#
# Cloudkms = Google::Apis::CloudkmsV1 # Alias the module
# service = Cloudkms::CloudKMSService.new
#
# @see https://cloud.google.com/kms/
class CloudKMSService < 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
def initialize
super('https://cloudkms.googleapis.com/', '')
end
# 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] quota_user
# Available to 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::CloudkmsV1::ListLocationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::ListLocationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}/locations', options)
command.response_representation = Google::Apis::CloudkmsV1::ListLocationsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1::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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Get information about a location.
# @param [String] name
# Resource name for the location.
# @param [String] quota_user
# Available to 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::CloudkmsV1::Location] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::Location]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1::Location::Representation
command.response_class = Google::Apis::CloudkmsV1::Location
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
# 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.
# See the operation documentation for the appropriate value for this field.
# @param [String] quota_user
# Available to 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::CloudkmsV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1::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
# Returns metadata for a given KeyRing.
# @param [String] name
# The name of the KeyRing to get.
# @param [String] quota_user
# Available to 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::CloudkmsV1::KeyRing] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1::KeyRing::Representation
command.response_class = Google::Apis::CloudkmsV1::KeyRing
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 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.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::CloudkmsV1::TestIamPermissionsRequest] test_iam_permissions_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::CloudkmsV1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudkmsV1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudkmsV1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1::TestIamPermissionsResponse
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
# 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] quota_user
# Available to 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::CloudkmsV1::ListKeyRingsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::ListKeyRingsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/keyRings', options)
command.response_representation = Google::Apis::CloudkmsV1::ListKeyRingsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1::ListKeyRingsResponse
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
# Create a new KeyRing in a given Project and Location.
# @param [String] parent
# Required. The resource name of the location associated with the
# KeyRings, in the format `projects/*/locations/*`.
# @param [Google::Apis::CloudkmsV1::KeyRing] key_ring_object
# @param [String] key_ring_id
# Required. It must be unique within a location and match the regular
# expression `[a-zA-Z0-9_-]`1,63``
# @param [String] quota_user
# Available to 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::CloudkmsV1::KeyRing] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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 create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/keyRings', options)
command.request_representation = Google::Apis::CloudkmsV1::KeyRing::Representation
command.request_object = key_ring_object
command.response_representation = Google::Apis::CloudkmsV1::KeyRing::Representation
command.response_class = Google::Apis::CloudkmsV1::KeyRing
command.params['parent'] = parent unless parent.nil?
command.query['keyRingId'] = key_ring_id unless key_ring_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 the specified resource. Replaces any
# existing policy.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::CloudkmsV1::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::CloudkmsV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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_key_ring_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudkmsV1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1::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
# Lists CryptoKeys.
# @param [String] parent
# Required. The resource name of the KeyRing to list, in the format
# `projects/*/locations/*/keyRings/*`.
# @param [String] page_token
# Optional pagination token, returned earlier via
# ListCryptoKeysResponse.next_page_token.
# @param [Fixnum] page_size
# Optional limit on the number of CryptoKeys to include in the
# response. Further CryptoKeys can subsequently be obtained by
# including the ListCryptoKeysResponse.next_page_token in a subsequent
# request. If unspecified, the server will pick an appropriate default.
# @param [String] quota_user
# Available to 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::CloudkmsV1::ListCryptoKeysResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::ListCryptoKeysResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_keys(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/cryptoKeys', options)
command.response_representation = Google::Apis::CloudkmsV1::ListCryptoKeysResponse::Representation
command.response_class = Google::Apis::CloudkmsV1::ListCryptoKeysResponse
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
# Encrypt data, so that it can only be recovered by a call to Decrypt.
# @param [String] name
# Required. The resource name of the CryptoKey or CryptoKeyVersion
# to use for encryption.
# If a CryptoKey is specified, the server will use its
# primary version.
# @param [Google::Apis::CloudkmsV1::EncryptRequest] encrypt_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::CloudkmsV1::EncryptResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::EncryptResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def encrypt_crypto_key(name, encrypt_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:encrypt', options)
command.request_representation = Google::Apis::CloudkmsV1::EncryptRequest::Representation
command.request_object = encrypt_request_object
command.response_representation = Google::Apis::CloudkmsV1::EncryptResponse::Representation
command.response_class = Google::Apis::CloudkmsV1::EncryptResponse
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
# Create a new CryptoKey within a KeyRing.
# CryptoKey.purpose is required.
# @param [String] parent
# Required. The name of the KeyRing associated with the
# CryptoKeys.
# @param [Google::Apis::CloudkmsV1::CryptoKey] crypto_key_object
# @param [String] crypto_key_id
# Required. It must be unique within a KeyRing and match the regular
# expression `[a-zA-Z0-9_-]`1,63``
# @param [String] quota_user
# Available to 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::CloudkmsV1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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 create_project_location_key_ring_crypto_key(parent, crypto_key_object = nil, crypto_key_id: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/cryptoKeys', options)
command.request_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation
command.request_object = crypto_key_object
command.response_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKey
command.params['parent'] = parent unless parent.nil?
command.query['cryptoKeyId'] = crypto_key_id unless crypto_key_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 the specified resource. Replaces any
# existing policy.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::CloudkmsV1::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::CloudkmsV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudkmsV1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1::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
# Update the version of a CryptoKey that will be used in Encrypt
# @param [String] name
# The resource name of the CryptoKey to update.
# @param [Google::Apis::CloudkmsV1::UpdateCryptoKeyPrimaryVersionRequest] update_crypto_key_primary_version_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::CloudkmsV1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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 update_project_location_key_ring_crypto_key_primary_version(name, update_crypto_key_primary_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:updatePrimaryVersion', options)
command.request_representation = Google::Apis::CloudkmsV1::UpdateCryptoKeyPrimaryVersionRequest::Representation
command.request_object = update_crypto_key_primary_version_request_object
command.response_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKey
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
# 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.
# See the operation documentation for the appropriate value for this field.
# @param [String] quota_user
# Available to 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::CloudkmsV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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_crypto_key_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1::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
# Returns metadata for a given CryptoKey, as well as its
# primary CryptoKeyVersion.
# @param [String] name
# The name of the CryptoKey to get.
# @param [String] quota_user
# Available to 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::CloudkmsV1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKey
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
# Update a CryptoKey.
# @param [String] name
# Output only. The resource name for this CryptoKey in the format
# `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
# @param [Google::Apis::CloudkmsV1::CryptoKey] crypto_key_object
# @param [String] update_mask
# Required list of fields to be updated in this 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
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudkmsV1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation
command.request_object = crypto_key_object
command.response_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKey
command.params['name'] = name unless name.nil?
command.query['updateMask'] = update_mask unless update_mask.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 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.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::CloudkmsV1::TestIamPermissionsRequest] test_iam_permissions_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::CloudkmsV1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::CloudkmsV1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudkmsV1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1::TestIamPermissionsResponse
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
# 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::CloudkmsV1::DecryptRequest] decrypt_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::CloudkmsV1::DecryptResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:decrypt', options)
command.request_representation = Google::Apis::CloudkmsV1::DecryptRequest::Representation
command.request_object = decrypt_request_object
command.response_representation = Google::Apis::CloudkmsV1::DecryptResponse::Representation
command.response_class = Google::Apis::CloudkmsV1::DecryptResponse
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
# Restore a CryptoKeyVersion in the
# DESTROY_SCHEDULED,
# state.
# Upon restoration of the CryptoKeyVersion, state
# will be set to DISABLED,
# and destroy_time will be cleared.
# @param [String] name
# The resource name of the CryptoKeyVersion to restore.
# @param [Google::Apis::CloudkmsV1::RestoreCryptoKeyVersionRequest] restore_crypto_key_version_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::CloudkmsV1::CryptoKeyVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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 restore_crypto_key_version(name, restore_crypto_key_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:restore', options)
command.request_representation = Google::Apis::CloudkmsV1::RestoreCryptoKeyVersionRequest::Representation
command.request_object = restore_crypto_key_version_request_object
command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion
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 metadata for a given CryptoKeyVersion.
# @param [String] name
# The name of the CryptoKeyVersion to get.
# @param [String] quota_user
# Available to 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::CloudkmsV1::CryptoKeyVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion
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
# Update a CryptoKeyVersion's metadata.
# state may be changed between
# ENABLED and
# DISABLED using this
# method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to
# move between other states.
# @param [String] name
# Output only. The resource name for this CryptoKeyVersion in the format
# `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
# @param [Google::Apis::CloudkmsV1::CryptoKeyVersion] crypto_key_version_object
# @param [String] update_mask
# Required list of fields to be updated in this 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
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudkmsV1::CryptoKeyVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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 patch_project_location_key_ring_crypto_key_crypto_key_version(name, crypto_key_version_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
command.request_object = crypto_key_version_object
command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion
command.params['name'] = name unless name.nil?
command.query['updateMask'] = update_mask unless update_mask.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 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] quota_user
# Available to 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::CloudkmsV1::ListCryptoKeyVersionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::ListCryptoKeyVersionsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/cryptoKeyVersions', options)
command.response_representation = Google::Apis::CloudkmsV1::ListCryptoKeyVersionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1::ListCryptoKeyVersionsResponse
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
# Create a new CryptoKeyVersion in a CryptoKey.
# The server will assign the next sequential id. If unset,
# state will be set to
# ENABLED.
# @param [String] parent
# Required. The name of the CryptoKey associated with
# the CryptoKeyVersions.
# @param [Google::Apis::CloudkmsV1::CryptoKeyVersion] crypto_key_version_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::CloudkmsV1::CryptoKeyVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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 create_project_location_key_ring_crypto_key_crypto_key_version(parent, crypto_key_version_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/cryptoKeyVersions', options)
command.request_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
command.request_object = crypto_key_version_object
command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion
command.params['parent'] = parent unless parent.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Schedule a CryptoKeyVersion for destruction.
# Upon calling this method, CryptoKeyVersion.state will be set to
# DESTROY_SCHEDULED
# and destroy_time will be set to a time 24
# hours in the future, at which point the state
# will be changed to
# DESTROYED, and the key
# material will be irrevocably destroyed.
# Before the destroy_time is reached,
# RestoreCryptoKeyVersion may be called to reverse the process.
# @param [String] name
# The resource name of the CryptoKeyVersion to destroy.
# @param [Google::Apis::CloudkmsV1::DestroyCryptoKeyVersionRequest] destroy_crypto_key_version_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::CloudkmsV1::CryptoKeyVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1::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 destroy_crypto_key_version(name, destroy_crypto_key_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:destroy', options)
command.request_representation = Google::Apis::CloudkmsV1::DestroyCryptoKeyVersionRequest::Representation
command.request_object = destroy_crypto_key_version_request_object
command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion
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
protected
def apply_command_defaults(command)
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['key'] = key unless key.nil?
end
end
end
end
end

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -22,78 +22,6 @@ module Google
module Apis module Apis
module CloudkmsV1beta1 module CloudkmsV1beta1
class DecryptResponse
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 EncryptResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class KeyRing
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListLocationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RestoreCryptoKeyVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
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
include Google::Apis::Core::JsonObjectSupport
end
class ListKeyRingsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AuditConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CryptoKeyVersion
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CloudAuditOptions class CloudAuditOptions
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -130,13 +58,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class Rule class CryptoKey
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class CryptoKey class Rule
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -191,107 +119,75 @@ module Google
end end
class DecryptResponse class DecryptResponse
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :plaintext, :base64 => true, as: 'plaintext' include Google::Apis::Core::JsonObjectSupport
end
end end
class TestIamPermissionsRequest class TestIamPermissionsRequest
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class Policy include Google::Apis::Core::JsonObjectSupport
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :iam_owned, as: 'iamOwned'
collection :rules, as: 'rules', class: Google::Apis::CloudkmsV1beta1::Rule, decorator: Google::Apis::CloudkmsV1beta1::Rule::Representation
property :version, as: 'version'
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudkmsV1beta1::AuditConfig, decorator: Google::Apis::CloudkmsV1beta1::AuditConfig::Representation
collection :bindings, as: 'bindings', class: Google::Apis::CloudkmsV1beta1::Binding, decorator: Google::Apis::CloudkmsV1beta1::Binding::Representation
property :etag, :base64 => true, as: 'etag'
end
end
class EncryptResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :ciphertext, :base64 => true, as: 'ciphertext'
end
end end
class KeyRing class KeyRing
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name' include Google::Apis::Core::JsonObjectSupport
property :create_time, as: 'createTime'
end end
class EncryptResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end end
class ListLocationsResponse class ListLocationsResponse
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
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' include Google::Apis::Core::JsonObjectSupport
end
end end
class RestoreCryptoKeyVersionRequest class Policy
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
end include Google::Apis::Core::JsonObjectSupport
end end
class UpdateCryptoKeyPrimaryVersionRequest class UpdateCryptoKeyPrimaryVersionRequest
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :crypto_key_version_id, as: 'cryptoKeyVersionId' include Google::Apis::Core::JsonObjectSupport
end end
class RestoreCryptoKeyVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end end
class DataAccessOptions class DataAccessOptions
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
end include Google::Apis::Core::JsonObjectSupport
end end
class ListKeyRingsResponse class ListKeyRingsResponse
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
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 include Google::Apis::Core::JsonObjectSupport
end end
class AuditConfig class AuditConfig
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
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 include Google::Apis::Core::JsonObjectSupport
end end
class CryptoKeyVersion class CryptoKeyVersion
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :destroy_time, as: 'destroyTime' include Google::Apis::Core::JsonObjectSupport
property :create_time, as: 'createTime'
property :state, as: 'state'
property :name, as: 'name'
property :destroy_event_time, as: 'destroyEventTime'
end
end end
class CloudAuditOptions class CloudAuditOptions
@ -311,18 +207,18 @@ module Google
class EncryptRequest class EncryptRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :plaintext, :base64 => true, as: 'plaintext'
property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData' property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData'
property :plaintext, :base64 => true, as: 'plaintext'
end end
end end
class ListCryptoKeyVersionsResponse class ListCryptoKeyVersionsResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :crypto_key_versions, as: 'cryptoKeyVersions', class: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
property :next_page_token, as: 'nextPageToken' property :next_page_token, as: 'nextPageToken'
property :total_size, as: 'totalSize' property :total_size, as: 'totalSize'
collection :crypto_key_versions, as: 'cryptoKeyVersions', class: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
end end
end end
@ -339,9 +235,24 @@ module Google
end end
end end
class CryptoKey
# @private
class Representation < Google::Apis::Core::JsonRepresentation
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 Rule class Rule
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
property :action, as: 'action'
collection :not_in, as: 'notIn' collection :not_in, as: 'notIn'
property :description, as: 'description' property :description, as: 'description'
collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1beta1::Condition, decorator: Google::Apis::CloudkmsV1beta1::Condition::Representation collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1beta1::Condition, decorator: Google::Apis::CloudkmsV1beta1::Condition::Representation
@ -349,33 +260,18 @@ module Google
collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1beta1::LogConfig, decorator: Google::Apis::CloudkmsV1beta1::LogConfig::Representation collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1beta1::LogConfig, decorator: Google::Apis::CloudkmsV1beta1::LogConfig::Representation
collection :in, as: 'in' collection :in, as: 'in'
collection :permissions, as: 'permissions'
property :action, as: 'action'
end
end
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'
end end
end end
class LogConfig class LogConfig
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1beta1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1beta1::DataAccessOptions::Representation
property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1beta1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1beta1::CloudAuditOptions::Representation 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 :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
end end
@ -399,10 +295,10 @@ module Google
class Location class Location
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
hash :labels, as: 'labels'
property :name, as: 'name' property :name, as: 'name'
property :location_id, as: 'locationId' property :location_id, as: 'locationId'
hash :metadata, as: 'metadata' hash :metadata, as: 'metadata'
hash :labels, as: 'labels'
end end
end end
@ -419,12 +315,12 @@ module Google
class Condition class Condition
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :op, as: 'op'
property :svc, as: 'svc'
property :sys, as: 'sys' property :sys, as: 'sys'
property :value, as: 'value' property :value, as: 'value'
property :iam, as: 'iam'
collection :values, as: 'values' collection :values, as: 'values'
property :iam, as: 'iam'
property :op, as: 'op'
property :svc, as: 'svc'
end end
end end
@ -443,6 +339,110 @@ module Google
property :log_type, as: 'logType' property :log_type, as: 'logType'
end end
end end
class DecryptResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :plaintext, :base64 => true, as: 'plaintext'
end
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class KeyRing
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :name, as: 'name'
end
end
class EncryptResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :ciphertext, :base64 => true, as: 'ciphertext'
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 Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudkmsV1beta1::AuditConfig, decorator: Google::Apis::CloudkmsV1beta1::AuditConfig::Representation
collection :bindings, as: 'bindings', class: Google::Apis::CloudkmsV1beta1::Binding, decorator: Google::Apis::CloudkmsV1beta1::Binding::Representation
property :etag, :base64 => true, as: 'etag'
property :iam_owned, as: 'iamOwned'
collection :rules, as: 'rules', class: Google::Apis::CloudkmsV1beta1::Rule, decorator: Google::Apis::CloudkmsV1beta1::Rule::Representation
property :version, as: 'version'
end
end
class UpdateCryptoKeyPrimaryVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :crypto_key_version_id, as: 'cryptoKeyVersionId'
end
end
class RestoreCryptoKeyVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class DataAccessOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class ListKeyRingsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
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'
end
end
class CryptoKeyVersion
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :state, as: 'state'
property :name, as: 'name'
property :destroy_event_time, as: 'destroyEventTime'
property :destroy_time, as: 'destroyTime'
property :create_time, as: 'createTime'
end
end
end end
end end
end end

View File

@ -116,13 +116,126 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end 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] 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::ListKeyRingsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_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['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)
end
# Create a new KeyRing in a given Project and Location.
# @param [String] parent
# Required. The resource name of the location associated with the
# KeyRings, in the format `projects/*/locations/*`.
# @param [Google::Apis::CloudkmsV1beta1::KeyRing] key_ring_object
# @param [String] key_ring_id
# Required. It must be unique within a location and match the regular
# expression `[a-zA-Z0-9_-]`1,63``
# @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 create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/keyRings', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation
command.request_object = key_ring_object
command.response_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::KeyRing
command.params['parent'] = parent unless parent.nil?
command.query['keyRingId'] = key_ring_id unless key_ring_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
# 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.
# See the operation documentation for the appropriate value for this field.
# @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_key_ring_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
# Gets the access control policy for a resource. # Gets the access control policy for a resource.
# Returns an empty policy if the resource exists and does not have a policy # Returns an empty policy if the resource exists and does not have a policy
# set. # set.
# @param [String] resource # @param [String] resource
# REQUIRED: The resource for which the policy is being requested. # REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project # See the operation documentation for the appropriate value for this field.
# resource is specified as `projects/`project``.
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -188,8 +301,7 @@ module Google
# may "fail open" without warning. # may "fail open" without warning.
# @param [String] resource # @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested. # REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project # See the operation documentation for the appropriate value for this field.
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
@ -220,18 +332,10 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Lists KeyRings. # Update the version of a CryptoKey that will be used in Encrypt
# @param [String] parent # @param [String] name
# Required. The resource name of the location associated with the # The resource name of the CryptoKey to update.
# KeyRings, in the format `projects/*/locations/*`. # @param [Google::Apis::CloudkmsV1beta1::UpdateCryptoKeyPrimaryVersionRequest] update_crypto_key_primary_version_request_object
# @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] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -241,33 +345,32 @@ module Google
# Request-specific options # Request-specific options
# #
# @yield [result, err] Result & error if block supplied # @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse] parsed result object # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed # @yieldparam err [StandardError] error object if request failed
# #
# @return [Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse] # @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
# #
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_location_key_rings(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) def update_project_location_key_ring_crypto_key_primary_version(name, update_crypto_key_primary_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/keyRings', options) command = make_simple_command(:post, 'v1beta1/{+name}:updatePrimaryVersion', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse::Representation command.request_representation = Google::Apis::CloudkmsV1beta1::UpdateCryptoKeyPrimaryVersionRequest::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse command.request_object = update_crypto_key_primary_version_request_object
command.params['parent'] = parent unless parent.nil? command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
command.query['pageToken'] = page_token unless page_token.nil? command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
command.query['pageSize'] = page_size unless page_size.nil? command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Sets the access control policy on the specified resource. Replaces any # Gets the access control policy for a resource.
# existing policy. # Returns an empty policy if the resource exists and does not have a policy
# set.
# @param [String] resource # @param [String] resource
# REQUIRED: The resource for which the policy is being specified. # REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project # See the operation documentation for the appropriate value for this field.
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -285,10 +388,8 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def set_key_ring_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) def get_project_location_key_ring_crypto_key_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options) command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', 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_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::Policy command.response_class = Google::Apis::CloudkmsV1beta1::Policy
command.params['resource'] = resource unless resource.nil? command.params['resource'] = resource unless resource.nil?
@ -297,14 +398,10 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Create a new KeyRing in a given Project and Location. # Returns metadata for a given CryptoKey, as well as its
# @param [String] parent # primary CryptoKeyVersion.
# Required. The resource name of the location associated with the # @param [String] name
# KeyRings, in the format `projects/*/locations/*`. # The name of the CryptoKey to get.
# @param [Google::Apis::CloudkmsV1beta1::KeyRing] key_ring_object
# @param [String] key_ring_id
# Required. It must be unique within a location and match the regular
# expression `[a-zA-Z0-9_-]`1,63``
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -314,22 +411,129 @@ module Google
# Request-specific options # Request-specific options
# #
# @yield [result, err] Result & error if block supplied # @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudkmsV1beta1::KeyRing] parsed result object # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object
# @yieldparam err [StandardError] error object if request failed # @yieldparam err [StandardError] error object if request failed
# #
# @return [Google::Apis::CloudkmsV1beta1::KeyRing] # @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
# #
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, fields: nil, quota_user: nil, options: nil, &block) def get_project_location_key_ring_crypto_key(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/keyRings', options) command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
command.request_object = key_ring_object command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
command.response_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation command.params['name'] = name unless name.nil?
command.response_class = Google::Apis::CloudkmsV1beta1::KeyRing command.query['fields'] = fields unless fields.nil?
command.params['parent'] = parent unless parent.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['keyRingId'] = key_ring_id unless key_ring_id.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.
# Note: This operation is designed to be used for building permission-aware
# UIs and command-line tools, not for authorization checking. This operation
# may "fail open" without warning.
# @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
@ -455,8 +659,7 @@ module Google
# existing policy. # existing policy.
# @param [String] resource # @param [String] resource
# REQUIRED: The resource for which the policy is being specified. # REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project # See the operation documentation for the appropriate value for this field.
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest] set_iam_policy_request_object # @param [Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
@ -487,253 +690,6 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Update the version of a CryptoKey that will be used in Encrypt
# @param [String] name
# The resource name of the CryptoKey to update.
# @param [Google::Apis::CloudkmsV1beta1::UpdateCryptoKeyPrimaryVersionRequest] update_crypto_key_primary_version_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::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 update_project_location_key_ring_crypto_key_primary_version(name, update_crypto_key_primary_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+name}:updatePrimaryVersion', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::UpdateCryptoKeyPrimaryVersionRequest::Representation
command.request_object = update_crypto_key_primary_version_request_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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the access control policy for a 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_crypto_key_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
# 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.
# Upon restoration of the CryptoKeyVersion, state
# will be set to DISABLED,
# and destroy_time will be cleared.
# @param [String] name
# The resource name of the CryptoKeyVersion to restore.
# @param [Google::Apis::CloudkmsV1beta1::RestoreCryptoKeyVersionRequest] restore_crypto_key_version_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::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 restore_crypto_key_version(name, restore_crypto_key_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+name}:restore', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::RestoreCryptoKeyVersionRequest::Representation
command.request_object = restore_crypto_key_version_request_object
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. # Update a CryptoKeyVersion's metadata.
# state may be changed between # state may be changed between
# ENABLED and # ENABLED and
@ -810,15 +766,15 @@ module Google
# @param [String] parent # @param [String] parent
# Required. The resource name of the CryptoKey to list, in the format # Required. The resource name of the CryptoKey to list, in the format
# `projects/*/locations/*/keyRings/*/cryptoKeys/*`. # `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
# @param [String] page_token
# Optional pagination token, returned earlier via
# ListCryptoKeyVersionsResponse.next_page_token.
# @param [Fixnum] page_size # @param [Fixnum] page_size
# Optional limit on the number of CryptoKeyVersions to # Optional limit on the number of CryptoKeyVersions to
# include in the response. Further CryptoKeyVersions can # include in the response. Further CryptoKeyVersions can
# subsequently be obtained by including the # subsequently be obtained by including the
# ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. # ListCryptoKeyVersionsResponse.next_page_token in a subsequent request.
# If unspecified, the server will pick an appropriate default. # 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 # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -836,13 +792,50 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
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) 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)
command = make_simple_command(:get, 'v1beta1/{+parent}/cryptoKeyVersions', options) command = make_simple_command(:get, 'v1beta1/{+parent}/cryptoKeyVersions', options)
command.response_representation = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse::Representation command.response_representation = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse command.response_class = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse
command.params['parent'] = parent unless parent.nil? 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['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
# Create a new CryptoKeyVersion in a CryptoKey.
# The server will assign the next sequential id. If unset,
# state will be set to
# ENABLED.
# @param [String] parent
# Required. The name of the CryptoKey associated with
# the CryptoKeyVersions.
# @param [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] crypto_key_version_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::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 create_project_location_key_ring_crypto_key_crypto_key_version(parent, crypto_key_version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/cryptoKeyVersions', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
command.request_object = crypto_key_version_object
command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
@ -890,14 +883,15 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Create a new CryptoKeyVersion in a CryptoKey. # Restore a CryptoKeyVersion in the
# The server will assign the next sequential id. If unset, # DESTROY_SCHEDULED,
# state will be set to # state.
# ENABLED. # Upon restoration of the CryptoKeyVersion, state
# @param [String] parent # will be set to DISABLED,
# Required. The name of the CryptoKey associated with # and destroy_time will be cleared.
# the CryptoKeyVersions. # @param [String] name
# @param [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] crypto_key_version_object # The resource name of the CryptoKeyVersion to restore.
# @param [Google::Apis::CloudkmsV1beta1::RestoreCryptoKeyVersionRequest] restore_crypto_key_version_request_object
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -915,13 +909,13 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_key_ring_crypto_key_crypto_key_version(parent, crypto_key_version_object = nil, fields: nil, quota_user: nil, options: nil, &block) def restore_crypto_key_version(name, restore_crypto_key_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/cryptoKeyVersions', options) command = make_simple_command(:post, 'v1beta1/{+name}:restore', options)
command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation command.request_representation = Google::Apis::CloudkmsV1beta1::RestoreCryptoKeyVersionRequest::Representation
command.request_object = crypto_key_version_object command.request_object = restore_crypto_key_version_request_object
command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
command.params['parent'] = parent unless parent.nil? command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/monitoring/v2beta2/ # @see https://cloud.google.com/monitoring/v2beta2/
module CloudmonitoringV2beta2 module CloudmonitoringV2beta2
VERSION = 'V2beta2' VERSION = 'V2beta2'
REVISION = '20170130' REVISION = '20170219'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,73 @@ module Google
module Apis module Apis
module CloudresourcemanagerV1 module CloudresourcemanagerV1
class SetIamPolicyRequest class Empty
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 GetAncestryResponse
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 SearchOrganizationsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetAncestryRequest
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 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 AuditConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -34,30 +100,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ListLiensResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Binding class Binding
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UndeleteProjectRequest class UndeleteProjectRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class Organization
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ProjectCreationStatus class ProjectCreationStatus
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -82,30 +142,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class GetAncestryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListProjectsResponse class ListProjectsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class SearchOrganizationsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetAncestryRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Project class Project
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -118,37 +160,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class TestIamPermissionsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FolderOperationError class FolderOperationError
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class FolderOperation class Lien
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 Operation
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -161,19 +179,133 @@ module Google
end end
class SetIamPolicyRequest class SetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::Policy, decorator: Google::Apis::CloudresourcemanagerV1::Policy::Representation end
end
class Organization
# @private
class Representation < Google::Apis::Core::JsonRepresentation
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'
property :creation_time, as: 'creationTime'
end
end
class GetAncestryResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :ancestor, as: 'ancestor', class: Google::Apis::CloudresourcemanagerV1::Ancestor, decorator: Google::Apis::CloudresourcemanagerV1::Ancestor::Representation
end
end
class AuditLogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers'
property :log_type, as: 'logType'
end
end
class SearchOrganizationsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :filter, as: 'filter'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
end
end
class GetAncestryRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
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 Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudresourcemanagerV1::AuditConfig, decorator: Google::Apis::CloudresourcemanagerV1::AuditConfig::Representation
collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1::Binding, decorator: Google::Apis::CloudresourcemanagerV1::Binding::Representation
end
end
class ResourceId
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :type, as: 'type'
end
end
class AuditConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :service, as: 'service'
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudresourcemanagerV1::AuditLogConfig, decorator: Google::Apis::CloudresourcemanagerV1::AuditLogConfig::Representation
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::CloudresourcemanagerV1::Status, decorator: Google::Apis::CloudresourcemanagerV1::Status::Representation
hash :metadata, as: 'metadata'
end end
end end
class Status class Status
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :message, as: 'message'
collection :details, as: 'details' collection :details, as: 'details'
property :code, as: 'code' property :code, as: 'code'
property :message, as: 'message' end
end
class ListLiensResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :liens, as: 'liens', class: Google::Apis::CloudresourcemanagerV1::Lien, decorator: Google::Apis::CloudresourcemanagerV1::Lien::Representation
end end
end end
@ -185,30 +317,12 @@ module Google
end end
end end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class UndeleteProjectRequest class UndeleteProjectRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
end end
end end
class Organization
# @private
class Representation < Google::Apis::Core::JsonRepresentation
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
class ProjectCreationStatus class ProjectCreationStatus
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -238,35 +352,12 @@ module Google
end end
end end
class GetAncestryResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :ancestor, as: 'ancestor', class: Google::Apis::CloudresourcemanagerV1::Ancestor, decorator: Google::Apis::CloudresourcemanagerV1::Ancestor::Representation
end
end
class ListProjectsResponse class ListProjectsResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation 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 collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1::Project, decorator: Google::Apis::CloudresourcemanagerV1::Project::Representation
end property :next_page_token, as: 'nextPageToken'
end
class SearchOrganizationsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :filter, as: 'filter'
property :page_token, as: 'pageToken'
property :page_size, as: 'pageSize'
end
end
class GetAncestryRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end end
end end
@ -293,13 +384,6 @@ module Google
end end
end end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class FolderOperationError class FolderOperationError
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -307,43 +391,15 @@ module Google
end end
end end
class FolderOperation class Lien
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName' property :parent, as: 'parent'
property :source_parent, as: 'sourceParent' property :create_time, as: 'createTime'
property :destination_parent, as: 'destinationParent'
property :operation_type, as: 'operationType'
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::CloudresourcemanagerV1::Binding, decorator: Google::Apis::CloudresourcemanagerV1::Binding::Representation
end
end
class ResourceId
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :id, as: 'id'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
hash :response, as: 'response'
property :name, as: 'name' property :name, as: 'name'
property :error, as: 'error', class: Google::Apis::CloudresourcemanagerV1::Status, decorator: Google::Apis::CloudresourcemanagerV1::Status::Representation property :reason, as: 'reason'
property :origin, as: 'origin'
hash :metadata, as: 'metadata' collection :restrictions, as: 'restrictions'
end end
end end
@ -354,6 +410,15 @@ module Google
end end
end end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :update_mask, as: 'updateMask'
property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::Policy, decorator: Google::Apis::CloudresourcemanagerV1::Policy::Representation
end
end
end end
end end
end end

View File

@ -47,113 +47,37 @@ module Google
super('https://cloudresourcemanager.googleapis.com/', '') super('https://cloudresourcemanager.googleapis.com/', '')
end end
# Gets the access control policy for an Organization resource. May be empty # Sets the IAM access control policy for the specified Project. Replaces
# if no such policy or resource exists. The `resource` field should be the # any existing policy.
# organization's resource name, e.g. "organizations/123". # The following constraints apply when using `setIamPolicy()`:
# @param [String] resource # + Project does not support `allUsers` and `allAuthenticatedUsers` as
# REQUIRED: The resource for which the policy is being requested. # `members` in a `Binding` of a `Policy`.
# `resource` is usually specified as a path. For example, a Project # + The owner role can be granted only to `user` and `serviceAccount`.
# resource is specified as `projects/`project``. # + Service accounts can be made owners of a project directly
# @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object # without any restrictions. However, to be added as an owner, a user must be
# @param [String] fields # invited via Cloud Platform console and must accept the invitation.
# Selector specifying which fields to include in a partial response. # + A user cannot be granted the owner role using `setIamPolicy()`. The user
# @param [String] quota_user # must be granted the owner role using the Cloud Platform Console and must
# Available to use for quota purposes for server-side applications. Can be any # explicitly accept the invitation.
# arbitrary string assigned to a user, but should not exceed 40 characters. # + Invitations to grant the owner role cannot be sent using
# @param [Google::Apis::RequestOptions] options # `setIamPolicy()`;
# Request-specific options # they must be sent only using the Cloud Platform Console.
# # + Membership changes that leave the project without any owners that have
# @yield [result, err] Result & error if block supplied # accepted the Terms of Service (ToS) will be rejected.
# @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object # + There must be at least one owner who has accepted the Terms of
# @yieldparam err [StandardError] error object if request failed # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to
# # to remove the last ToS-accepted owner from the policy will fail. This
# @return [Google::Apis::CloudresourcemanagerV1::Policy] # restriction also applies to legacy projects that no longer have owners
# # who have accepted the ToS. Edits to IAM policies will be rejected until
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # the lack of a ToS-accepting owner is rectified.
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # + Calling this method requires enabling the App Engine Admin API.
# @raise [Google::Apis::AuthorizationError] Authorization is required # Note: Removing service accounts from policies or changing their roles
def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) # can render services completely inoperable. It is important to understand
command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) # how the service account is being used before removing or updating its
command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation # roles.
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 # @param [String] resource
# REQUIRED: The resource for which the policy is being specified. # REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project # See the operation documentation for the appropriate value for this field.
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
@ -172,8 +96,8 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @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) 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/{+resource}:setIamPolicy', options) command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
@ -184,75 +108,6 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end 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 # 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 # can be used to track the creation process. It is automatically deleted
# after a few hours, so there is no need to call DeleteOperation. # after a few hours, so there is no need to call DeleteOperation.
@ -289,74 +144,11 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end 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. # Returns the IAM access control policy for the specified Project.
# Permission is denied if the policy or the resource does not exist. # Permission is denied if the policy or the resource does not exist.
# @param [String] resource # @param [String] resource
# REQUIRED: The resource for which the policy is being requested. # REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project # See the operation documentation for the appropriate value for this field.
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
@ -459,42 +251,6 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end 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::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_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::GetAncestryResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation
command.request_object = get_ancestry_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse
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
# Updates the attributes of the Project identified by the specified # Updates the attributes of the Project identified by the specified
# `project_id` (for example, `my-project-123`). # `project_id` (for example, `my-project-123`).
# The caller must have modify permissions for this Project. # The caller must have modify permissions for this Project.
@ -531,11 +287,46 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end 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::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_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::GetAncestryResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation
command.request_object = get_ancestry_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse
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
# Returns permissions that a caller has on the specified Project. # Returns permissions that a caller has on the specified Project.
# @param [String] resource # @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested. # REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project # See the operation documentation for the appropriate value for this field.
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
@ -618,6 +409,15 @@ module Google
# Lists Projects that are visible to the user and satisfy the # Lists Projects that are visible to the user and satisfy the
# specified filter. This method returns Projects in an unspecified order. # specified filter. This method returns Projects in an unspecified order.
# New Projects do not necessarily appear at the end of the list. # New Projects do not necessarily appear at the end of the list.
# @param [String] page_token
# 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] filter # @param [String] filter
# An expression for filtering the results of the request. Filter rules are # An expression for filtering the results of the request. Filter rules are
# case insensitive. The fields eligible for filtering are: # case insensitive. The fields eligible for filtering are:
@ -636,15 +436,6 @@ module Google
# |labels.color:red&nbsp;label.size:big|The project's label `color` has the # |labels.color:red&nbsp;label.size:big|The project's label `color` has the
# value `red` and its label `size` has the value `big`. # value `red` and its label `size` has the value `big`.
# Optional. # Optional.
# @param [String] page_token
# 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 # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -662,13 +453,323 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def list_projects(filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) def list_projects(page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects', options) command = make_simple_command(:get, 'v1/projects', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil? command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.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
# 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.
# See the operation documentation for the appropriate value for this field.
# @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.
# See the operation documentation for the appropriate value for this field.
# @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.
# See the operation documentation for the appropriate value for this field.
# @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
# Create a Lien which applies to the resource denoted by the `parent` field.
# Callers of this method will require permission on the `parent` resource.
# For example, applying to `projects/1234` requires permission
# `resourcemanager.projects.updateLiens`.
# NOTE: Some resources may limit the number of Liens which may be applied.
# @param [Google::Apis::CloudresourcemanagerV1::Lien] lien_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::Lien] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::Lien]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/liens', options)
command.request_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
command.request_object = lien_object
command.response_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Lien
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Delete a Lien by `name`.
# Callers of this method will require permission on the `parent` resource.
# For example, a Lien with a `parent` of `projects/1234` requires permission
# `resourcemanager.projects.updateLiens`.
# @param [String] name
# The name/identifier of the Lien 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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::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_lien(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::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
# List all Liens applied to the `parent` resource.
# Callers of this method will require permission on the `parent` resource.
# For example, a Lien with a `parent` of `projects/1234` requires permission
# `resourcemanager.projects.get`.
# @param [String] page_token
# The `next_page_token` value returned from a previous List request, if any.
# @param [Fixnum] page_size
# The maximum number of items to return. This is a suggestion for the server.
# @param [String] parent
# The name of the resource to list all attached Liens.
# For example, `projects/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::ListLiensResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::ListLiensResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_liens(page_token: nil, page_size: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/liens', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# 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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)

View File

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

View File

@ -22,19 +22,6 @@ module Google
module Apis module Apis
module CloudresourcemanagerV1beta1 module CloudresourcemanagerV1beta1
# Request message for `GetIamPolicy` method.
class GetIamPolicyRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Response message for `TestIamPermissions` method. # Response message for `TestIamPermissions` method.
class TestIamPermissionsResponse class TestIamPermissionsResponse
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -55,24 +42,16 @@ module Google
end end
end end
# Response from the GetAncestry method. # Request message for `GetIamPolicy` method.
class GetAncestryResponse class GetIamPolicyRequest
include Google::Apis::Core::Hashable 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::CloudresourcemanagerV1beta1::Ancestor>]
attr_accessor :ancestor
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@ancestor = args[:ancestor] if args.key?(:ancestor)
end end
end end
@ -98,6 +77,27 @@ module Google
end end
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::CloudresourcemanagerV1beta1::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 # A page of the response received from the
# ListProjects # ListProjects
# method. # method.
@ -136,6 +136,49 @@ module Google
end end
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
# The request sent to the # The request sent to the
# GetAncestry # GetAncestry
# method. # method.
@ -152,7 +195,7 @@ module Google
end end
# A Project is a high-level Google Cloud Platform entity. It is a # A Project is a high-level Google Cloud Platform entity. It is a
# container for ACLs, APIs, AppEngine Apps, VMs, and other # container for ACLs, APIs, App Engine Apps, VMs, and other
# Google Cloud Platform resources. # Google Cloud Platform resources.
class Project class Project
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -182,12 +225,18 @@ module Google
# A container to reference an id for any resource type. A `resource` in Google # 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 # 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, # interact with through one of our API's. Some examples are an App Engine app,
# a Compute Engine instance, a Cloud SQL database, and so on. # a Compute Engine instance, a Cloud SQL database, and so on.
# Corresponds to the JSON property `parent` # Corresponds to the JSON property `parent`
# @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId]
attr_accessor :parent attr_accessor :parent
# Creation time.
# Read-only.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# The labels associated with this Project. # The labels associated with this Project.
# Label keys must be between 1 and 63 characters long and must conform # 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\])?. # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
@ -202,12 +251,6 @@ module Google
# @return [Hash<String,String>] # @return [Hash<String,String>]
attr_accessor :labels 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. # The user-assigned display name of the Project.
# It must be 4 to 30 characters. # It must be 4 to 30 characters.
# Allowed characters are: lowercase and uppercase letters, numbers, # Allowed characters are: lowercase and uppercase letters, numbers,
@ -228,8 +271,8 @@ module Google
@lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
@project_number = args[:project_number] if args.key?(:project_number) @project_number = args[:project_number] if args.key?(:project_number)
@parent = args[:parent] if args.key?(:parent) @parent = args[:parent] if args.key?(:parent)
@labels = args[:labels] if args.key?(:labels)
@create_time = args[:create_time] if args.key?(:create_time) @create_time = args[:create_time] if args.key?(:create_time)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name) @name = args[:name] if args.key?(:name)
end end
end end
@ -256,25 +299,6 @@ module Google
end end
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 # Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources. # specify access control policies for Cloud Platform resources.
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
@ -304,6 +328,18 @@ module Google
class Policy class Policy
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Specifies cloud audit logging configuration for this policy.
# Corresponds to the JSON property `auditConfigs`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::AuditConfig>]
attr_accessor :audit_configs
# 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 # `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other. # prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the # It is strongly suggested that systems make use of the `etag` in the
@ -322,22 +358,16 @@ module Google
# @return [Fixnum] # @return [Fixnum]
attr_accessor :version 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) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
@bindings = args[:bindings] if args.key?(:bindings)
@etag = args[:etag] if args.key?(:etag) @etag = args[:etag] if args.key?(:etag)
@version = args[:version] if args.key?(:version) @version = args[:version] if args.key?(:version)
@bindings = args[:bindings] if args.key?(:bindings)
end end
end end
@ -345,11 +375,6 @@ module Google
class FolderOperation class FolderOperation
include Google::Apis::Core::Hashable 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. # The display name of the folder.
# Corresponds to the JSON property `displayName` # Corresponds to the JSON property `displayName`
# @return [String] # @return [String]
@ -367,22 +392,46 @@ module Google
# @return [String] # @return [String]
attr_accessor :destination_parent attr_accessor :destination_parent
# The type of this operation.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@operation_type = args[:operation_type] if args.key?(:operation_type)
@display_name = args[:display_name] if args.key?(:display_name) @display_name = args[:display_name] if args.key?(:display_name)
@source_parent = args[:source_parent] if args.key?(:source_parent) @source_parent = args[:source_parent] if args.key?(:source_parent)
@destination_parent = args[:destination_parent] if args.key?(:destination_parent) @destination_parent = args[:destination_parent] if args.key?(:destination_parent)
@operation_type = args[:operation_type] if args.key?(:operation_type)
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
end end
# A container to reference an id for any resource type. A `resource` in Google # 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 # 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, # interact with through one of our API's. Some examples are an App Engine app,
# a Compute Engine instance, a Cloud SQL database, and so on. # a Compute Engine instance, a Cloud SQL database, and so on.
class ResourceId class ResourceId
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -410,13 +459,87 @@ module Google
end end
end end
# 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.
# If there are AuditConfigs for both `allServices` and a specific service,
# the union of the two AuditConfigs is used for that service: the log_types
# specified in each AuditConfig are enabled, and the exempted_members in each
# AuditConfig are exempted.
# Example Policy with multiple AuditConfigs:
# `
# "audit_configs": [
# `
# "service": "allServices"
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# "exempted_members": [
# "user:foo@gmail.com"
# ]
# `,
# `
# "log_type": "DATA_WRITE",
# `,
# `
# "log_type": "ADMIN_READ",
# `
# ]
# `,
# `
# "service": "fooservice@googleapis.com"
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# `,
# `
# "log_type": "DATA_WRITE",
# "exempted_members": [
# "user:bar@gmail.com"
# ]
# `
# ]
# `
# ]
# `
# For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
# logging. It also exempts foo@gmail.com from DATA_READ logging, and
# bar@gmail.com from DATA_WRITE logging.
class AuditConfig
include Google::Apis::Core::Hashable
# Specifies a service that will be enabled for audit logging.
# For example, `resourcemanager`, `storage`, `compute`.
# `allServices` is a special value that covers all services.
# Corresponds to the JSON property `service`
# @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::CloudresourcemanagerV1beta1::AuditLogConfig>]
attr_accessor :audit_log_configs
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@service = args[:service] if args.key?(:service)
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
end
end
# Identifying information for a single ancestor of a project. # Identifying information for a single ancestor of a project.
class Ancestor class Ancestor
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# A container to reference an id for any resource type. A `resource` in Google # 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 # 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, # interact with through one of our API's. Some examples are an App Engine app,
# a Compute Engine instance, a Cloud SQL database, and so on. # a Compute Engine instance, a Cloud SQL database, and so on.
# Corresponds to the JSON property `resourceId` # Corresponds to the JSON property `resourceId`
# @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId]
@ -432,35 +555,6 @@ module Google
end end
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. # Request message for `SetIamPolicy` method.
class SetIamPolicyRequest class SetIamPolicyRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -495,6 +589,15 @@ module Google
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy] # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
attr_accessor :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) def initialize(**args)
update!(**args) update!(**args)
end end
@ -502,6 +605,36 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@policy = args[:policy] if args.key?(:policy) @policy = args[:policy] if args.key?(:policy)
@update_mask = args[:update_mask] if args.key?(:update_mask)
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
end end
@ -564,20 +697,6 @@ module Google
end end
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 # The root node in the resource hierarchy to which a particular entity's
# (e.g., company) resources belong. # (e.g., company) resources belong.
class Organization class Organization
@ -641,18 +760,26 @@ module Google
end end
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
# A status object which is used as the `metadata` field for the Operation # A status object which is used as the `metadata` field for the Operation
# returned by CreateProject. It provides insight for when significant phases of # returned by CreateProject. It provides insight for when significant phases of
# Project creation have completed. # Project creation have completed.
class ProjectCreationStatus class ProjectCreationStatus
include Google::Apis::Core::Hashable 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. # Creation time of the project creation workflow.
# Corresponds to the JSON property `createTime` # Corresponds to the JSON property `createTime`
# @return [String] # @return [String]
@ -666,15 +793,21 @@ module Google
attr_accessor :gettable attr_accessor :gettable
alias_method :gettable?, :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) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@ready = args[:ready] if args.key?(:ready)
@create_time = args[:create_time] if args.key?(:create_time) @create_time = args[:create_time] if args.key?(:create_time)
@gettable = args[:gettable] if args.key?(:gettable) @gettable = args[:gettable] if args.key?(:gettable)
@ready = args[:ready] if args.key?(:ready)
end end
end end
end end

View File

@ -22,19 +22,13 @@ module Google
module Apis module Apis
module CloudresourcemanagerV1beta1 module CloudresourcemanagerV1beta1
class GetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestIamPermissionsResponse class TestIamPermissionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class GetAncestryResponse class GetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -46,12 +40,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class GetAncestryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListProjectsResponse class ListProjectsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class AuditLogConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GetAncestryRequest class GetAncestryRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -70,12 +76,6 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class FolderOperationError
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Policy class Policy
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -88,25 +88,37 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class FolderOperationError
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ResourceId class ResourceId
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class AuditConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Ancestor class Ancestor
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ListOrganizationsResponse class SetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class SetIamPolicyRequest class ListOrganizationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -124,13 +136,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class UndeleteProjectRequest class Organization
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class Organization class UndeleteProjectRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -142,16 +154,23 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class TestIamPermissionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class GetIamPolicyRequest class GetIamPolicyRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
end end
end end
class TestIamPermissionsResponse class OrganizationOwner
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions' property :directory_customer_id, as: 'directoryCustomerId'
end end
end end
@ -163,13 +182,6 @@ module Google
end end
end end
class OrganizationOwner
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :directory_customer_id, as: 'directoryCustomerId'
end
end
class ListProjectsResponse class ListProjectsResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -179,6 +191,14 @@ module Google
end end
end end
class AuditLogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers'
property :log_type, as: 'logType'
end
end
class GetAncestryRequest class GetAncestryRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -193,8 +213,8 @@ module Google
property :project_number, as: 'projectNumber' property :project_number, as: 'projectNumber'
property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation 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 :create_time, as: 'createTime'
hash :labels, as: 'labels'
property :name, as: 'name' property :name, as: 'name'
end end
end end
@ -206,30 +226,32 @@ module Google
end end
end end
class FolderOperationError
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :error_message_id, as: 'errorMessageId'
end
end
class Policy class Policy
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :etag, :base64 => true, as: 'etag' collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig::Representation
property :version, as: 'version'
collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
end end
end end
class FolderOperation class FolderOperation
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :operation_type, as: 'operationType'
property :display_name, as: 'displayName' property :display_name, as: 'displayName'
property :source_parent, as: 'sourceParent' property :source_parent, as: 'sourceParent'
property :destination_parent, as: 'destinationParent' property :destination_parent, as: 'destinationParent'
property :operation_type, as: 'operationType'
end
end
class FolderOperationError
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :error_message_id, as: 'errorMessageId'
end end
end end
@ -241,6 +263,15 @@ module Google
end end
end end
class AuditConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :service, as: 'service'
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudresourcemanagerV1beta1::AuditLogConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::AuditLogConfig::Representation
end
end
class Ancestor class Ancestor
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -249,6 +280,15 @@ module Google
end 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
property :update_mask, as: 'updateMask'
end
end
class ListOrganizationsResponse class ListOrganizationsResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -258,14 +298,6 @@ module Google
end 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
end
class Binding class Binding
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -280,12 +312,6 @@ module Google
end end
end end
class UndeleteProjectRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Organization class Organization
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -299,12 +325,18 @@ module Google
end end
end end
class UndeleteProjectRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class ProjectCreationStatus class ProjectCreationStatus
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :ready, as: 'ready'
property :create_time, as: 'createTime' property :create_time, as: 'createTime'
property :gettable, as: 'gettable' property :gettable, as: 'gettable'
property :ready, as: 'ready'
end end
end end
end end

View File

@ -47,478 +47,6 @@ module Google
super('https://cloudresourcemanager.googleapis.com/', '') super('https://cloudresourcemanager.googleapis.com/', '')
end 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] 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::ListOrganizationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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 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
# 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::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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 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 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::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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_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
# 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::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 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
# 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] quota_user
# Available to 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::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::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, 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Marks the Project identified by the specified
# `project_id` (for example, `my-project-123`) for deletion.
# This method will only affect the Project if the following criteria are met:
# + The Project does not have a billing account associated with it.
# + The Project has a lifecycle state of
# ACTIVE.
# This method changes the Project's lifecycle state from
# ACTIVE
# to DELETE_REQUESTED.
# The deletion starts at an unspecified time, at which point the project is
# no longer accessible.
# Until the deletion completes, you can check the lifecycle state
# checked by retrieving the Project with GetProject,
# and the Project remains visible to ListProjects.
# However, you cannot update the project.
# After the deletion completes, the Project is not retrievable by
# the GetProject and
# ListProjects methods.
# The caller must have modify permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `foo-bar-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::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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 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['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 [String] filter
# An expression for filtering the results of the request. Filter rules are
# case insensitive. The fields eligible for filtering are:
# + `name`
# + `id`
# + <code>labels.<em>key</em></code> where *key* is the name of a label
# Some examples of using labels as filters:
# |Filter|Description|
# |------|-----------|
# |name:*|The project has a name.|
# |name:Howl|The project's name is `Howl` or `howl`.|
# |name:HOWL|Equivalent to above.|
# |NAME:howl|Equivalent to above.|
# |labels.color:*|The project has the label `color`.|
# |labels.color:red|The project's label `color` has the value `red`.|
# |labels.color:red&nbsp;label.size:big|The project's label `color` has the
# value `red` and its label `size` has the value `big`.
# Optional.
# @param [String] page_token
# 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] quota_user
# Available to 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::ListProjectsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(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['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
# 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::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::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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 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['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
# 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
# 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::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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_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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the Project identified by the specified # Retrieves the Project identified by the specified
# `project_id` (for example, `my-project-123`). # `project_id` (for example, `my-project-123`).
# The caller must have read permissions for this Project. # The caller must have read permissions for this Project.
@ -666,8 +194,7 @@ module Google
# Returns permissions that a caller has on the specified Project. # Returns permissions that a caller has on the specified Project.
# @param [String] resource # @param [String] resource
# REQUIRED: The resource for which the policy detail is being requested. # REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project # See the operation documentation for the appropriate value for this field.
# resource is specified as `projects/`project``.
# @param [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object # @param [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
@ -698,6 +225,473 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Marks the Project identified by the specified
# `project_id` (for example, `my-project-123`) for deletion.
# This method will only affect the Project if the following criteria are met:
# + The Project does not have a billing account associated with it.
# + The Project has a lifecycle state of
# ACTIVE.
# This method changes the Project's lifecycle state from
# ACTIVE
# to DELETE_REQUESTED.
# The deletion starts at an unspecified time, at which point the project is
# no longer accessible.
# Until the deletion completes, you can check the lifecycle state
# checked by retrieving the Project with GetProject,
# and the Project remains visible to ListProjects.
# However, you cannot update the project.
# After the deletion completes, the Project is not retrievable by
# the GetProject and
# ListProjects methods.
# The caller must have modify permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `foo-bar-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::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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 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['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:
# + `name`
# + `id`
# + <code>labels.<em>key</em></code> where *key* is the name of a label
# Some examples of using labels as filters:
# |Filter|Description|
# |------|-----------|
# |name:*|The project has a name.|
# |name:Howl|The project's name is `Howl` or `howl`.|
# |name:HOWL|Equivalent to above.|
# |NAME:howl|Equivalent to above.|
# |labels.color:*|The project has the label `color`.|
# |labels.color:red|The project's label `color` has the value `red`.|
# |labels.color:red&nbsp;label.size:big|The project's label `color` has the
# value `red` and its label `size` has the value `big`.
# Optional.
# @param [String] page_token
# A pagination token returned from a previous call to ListProjects
# that indicates from where listing should continue.
# 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::ListProjectsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.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.
# See the operation documentation for the appropriate value for this field.
# @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::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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 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['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
# 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
# REQUIRED: The resource for which the policy is being requested.
# See the operation documentation for the appropriate value for this field.
# @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::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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_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['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] quota_user
# Available to 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 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
# 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.
# See the operation documentation for the appropriate value for this field.
# @param [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_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::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::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, 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['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 [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] page_token
# A pagination token returned from a previous call to `ListOrganizations`
# that indicates from where listing should continue.
# 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::ListOrganizationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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 list_organizations(page_size: nil, filter: nil, page_token: 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['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['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.
# See the operation documentation for the appropriate value for this field.
# @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::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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 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 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.
# See the operation documentation for the appropriate value for this field.
# @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::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @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_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
protected protected
def apply_command_defaults(command) def apply_command_defaults(command)

View File

@ -28,16 +28,16 @@ module Google
# @see https://cloud.google.com/trace # @see https://cloud.google.com/trace
module CloudtraceV1 module CloudtraceV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20170208' REVISION = '20170225'
# Read Trace data for a project or application
AUTH_TRACE_READONLY = 'https://www.googleapis.com/auth/trace.readonly'
# Write Trace data for a project or application # Write Trace data for a project or application
AUTH_TRACE_APPEND = 'https://www.googleapis.com/auth/trace.append' AUTH_TRACE_APPEND = 'https://www.googleapis.com/auth/trace.append'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# Read Trace data for a project or application
AUTH_TRACE_READONLY = 'https://www.googleapis.com/auth/trace.readonly'
end end
end end
end end

View File

@ -22,25 +22,6 @@ module Google
module Apis module Apis
module CloudtraceV1 module CloudtraceV1
# List of new or updated traces.
class Traces
include Google::Apis::Core::Hashable
# List of traces.
# Corresponds to the JSON property `traces`
# @return [Array<Google::Apis::CloudtraceV1::Trace>]
attr_accessor :traces
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@traces = args[:traces] if args.key?(:traces)
end
end
# A span represents a single timed event within a trace. Spans can be nested # 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 # 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 # end-to-end latency of an operation and, optionally, one or more subspans for
@ -49,23 +30,6 @@ module Google
class TraceSpan class TraceSpan
include Google::Apis::Core::Hashable 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 # Collection of labels associated with the span. Label keys must be less than
# 128 bytes. Label values must be less than 16 kilobytes. # 128 bytes. Label values must be less than 16 kilobytes.
# Corresponds to the JSON property `labels` # Corresponds to the JSON property `labels`
@ -94,19 +58,36 @@ module Google
# @return [String] # @return [String]
attr_accessor :parent_span_id attr_accessor :parent_span_id
# 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
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) 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) @labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name) @name = args[:name] if args.key?(:name)
@span_id = args[:span_id] if args.key?(:span_id) @span_id = args[:span_id] if args.key?(:span_id)
@parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id) @parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id)
@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)
end end
end end
@ -189,6 +170,25 @@ module Google
@trace_id = args[:trace_id] if args.key?(:trace_id) @trace_id = args[:trace_id] if args.key?(:trace_id)
end end
end end
# List of new or updated traces.
class Traces
include Google::Apis::Core::Hashable
# List of traces.
# Corresponds to the JSON property `traces`
# @return [Array<Google::Apis::CloudtraceV1::Trace>]
attr_accessor :traces
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@traces = args[:traces] if args.key?(:traces)
end
end
end end
end end
end end

View File

@ -22,12 +22,6 @@ module Google
module Apis module Apis
module CloudtraceV1 module CloudtraceV1
class Traces
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TraceSpan class TraceSpan
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -53,23 +47,21 @@ module Google
end end
class Traces class Traces
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
collection :traces, as: 'traces', class: Google::Apis::CloudtraceV1::Trace, decorator: Google::Apis::CloudtraceV1::Trace::Representation
end include Google::Apis::Core::JsonObjectSupport
end end
class TraceSpan class TraceSpan
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :end_time, as: 'endTime'
property :start_time, as: 'startTime'
property :kind, as: 'kind'
hash :labels, as: 'labels' hash :labels, as: 'labels'
property :name, as: 'name' property :name, as: 'name'
property :span_id, as: 'spanId' property :span_id, as: 'spanId'
property :parent_span_id, as: 'parentSpanId' property :parent_span_id, as: 'parentSpanId'
property :end_time, as: 'endTime'
property :start_time, as: 'startTime'
property :kind, as: 'kind'
end end
end end
@ -97,6 +89,14 @@ module Google
property :trace_id, as: 'traceId' property :trace_id, as: 'traceId'
end end
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
end end
end end
end end

View File

@ -35,16 +35,16 @@ module Google
# #
# @see https://cloud.google.com/trace # @see https://cloud.google.com/trace
class CloudTraceService < Google::Apis::Core::BaseService class CloudTraceService < 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] # @return [String]
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user 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 def initialize
super('https://cloudtrace.googleapis.com/', '') super('https://cloudtrace.googleapis.com/', '')
end end
@ -57,11 +57,11 @@ module Google
# @param [String] project_id # @param [String] project_id
# ID of the Cloud project where the trace data is stored. # ID of the Cloud project where the trace data is stored.
# @param [Google::Apis::CloudtraceV1::Traces] traces_object # @param [Google::Apis::CloudtraceV1::Traces] traces_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -74,15 +74,15 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_project_traces(project_id, traces_object = nil, fields: nil, quota_user: nil, options: nil, &block) def patch_project_traces(project_id, traces_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/projects/{projectId}/traces', options) command = make_simple_command(:patch, 'v1/projects/{projectId}/traces', options)
command.request_representation = Google::Apis::CloudtraceV1::Traces::Representation command.request_representation = Google::Apis::CloudtraceV1::Traces::Representation
command.request_object = traces_object command.request_object = traces_object
command.response_representation = Google::Apis::CloudtraceV1::Empty::Representation command.response_representation = Google::Apis::CloudtraceV1::Empty::Representation
command.response_class = Google::Apis::CloudtraceV1::Empty command.response_class = Google::Apis::CloudtraceV1::Empty
command.params['projectId'] = project_id unless project_id.nil? 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
@ -118,11 +118,11 @@ module Google
# Descending order can be specified by appending `desc` to the sort field # Descending order can be specified by appending `desc` to the sort field
# (for example, `name desc`). # (for example, `name desc`).
# Only one sort field is permitted. # Only one sort field is permitted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -135,7 +135,7 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
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) 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, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/traces', options) command = make_simple_command(:get, 'v1/projects/{projectId}/traces', options)
command.response_representation = Google::Apis::CloudtraceV1::ListTracesResponse::Representation command.response_representation = Google::Apis::CloudtraceV1::ListTracesResponse::Representation
command.response_class = Google::Apis::CloudtraceV1::ListTracesResponse command.response_class = Google::Apis::CloudtraceV1::ListTracesResponse
@ -147,8 +147,8 @@ module Google
command.query['pageSize'] = page_size unless page_size.nil? command.query['pageSize'] = page_size unless page_size.nil?
command.query['view'] = view unless view.nil? command.query['view'] = view unless view.nil?
command.query['orderBy'] = order_by unless order_by.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? command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
@ -157,11 +157,11 @@ module Google
# ID of the Cloud project where the trace data is stored. # ID of the Cloud project where the trace data is stored.
# @param [String] trace_id # @param [String] trace_id
# ID of the trace to return. # ID of the trace to return.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -174,22 +174,22 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_trace(project_id, trace_id, fields: nil, quota_user: nil, options: nil, &block) def get_project_trace(project_id, trace_id, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/traces/{traceId}', options) command = make_simple_command(:get, 'v1/projects/{projectId}/traces/{traceId}', options)
command.response_representation = Google::Apis::CloudtraceV1::Trace::Representation command.response_representation = Google::Apis::CloudtraceV1::Trace::Representation
command.response_class = Google::Apis::CloudtraceV1::Trace command.response_class = Google::Apis::CloudtraceV1::Trace
command.params['projectId'] = project_id unless project_id.nil? command.params['projectId'] = project_id unless project_id.nil?
command.params['traceId'] = trace_id unless trace_id.nil? command.params['traceId'] = trace_id unless trace_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
protected protected
def apply_command_defaults(command) def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['key'] = key unless key.nil?
end end
end end
end end

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -106,6 +106,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class AliasIpRange
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AttachedDisk class AttachedDisk
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -286,6 +292,42 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class Commitment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitmentAggregatedList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitmentList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitmentsScopedList
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 Condition class Condition
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -934,6 +976,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class NetworksAddPeeringRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class NetworksRemovePeeringRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1018,6 +1072,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ProjectsDisableXpnResourceRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ProjectsEnableXpnResourceRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ProjectsGetXpnResources
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ProjectsListXpnHostsRequest class ProjectsListXpnHostsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1120,6 +1192,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ResourceCommitment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ResourceGroupReference class ResourceGroupReference
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1300,6 +1378,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class SubnetworkSecondaryRange
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SubnetworksExpandIpCidrRangeRequest class SubnetworksExpandIpCidrRangeRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1504,6 +1588,30 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class TargetTcpProxiesSetBackendServiceRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TargetTcpProxiesSetProxyHeaderRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TargetTcpProxy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TargetTcpProxyList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TargetVpnGateway class TargetVpnGateway
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1654,6 +1762,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class XpnResourceId
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Zone class Zone
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1826,6 +1940,14 @@ module Google
end end
end end
class AliasIpRange
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ip_cidr_range, as: 'ipCidrRange'
property :subnetwork_range_name, as: 'subnetworkRangeName'
end
end
class AttachedDisk class AttachedDisk
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -2173,6 +2295,78 @@ module Google
end end
end end
class Commitment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :end_timestamp, as: 'endTimestamp'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :plan, as: 'plan'
property :region, as: 'region'
collection :resources, as: 'resources', class: Google::Apis::ComputeBeta::ResourceCommitment, decorator: Google::Apis::ComputeBeta::ResourceCommitment::Representation
property :self_link, as: 'selfLink'
property :start_timestamp, as: 'startTimestamp'
property :status, as: 'status'
property :status_message, as: 'statusMessage'
end
end
class CommitmentAggregatedList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
hash :items, as: 'items', class: Google::Apis::ComputeBeta::CommitmentsScopedList, decorator: Google::Apis::ComputeBeta::CommitmentsScopedList::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
class CommitmentList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeBeta::Commitment, decorator: Google::Apis::ComputeBeta::Commitment::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
class CommitmentsScopedList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :commitments, as: 'commitments', class: Google::Apis::ComputeBeta::Commitment, decorator: Google::Apis::ComputeBeta::Commitment::Representation
property :warning, as: 'warning', class: Google::Apis::ComputeBeta::CommitmentsScopedList::Warning, decorator: Google::Apis::ComputeBeta::CommitmentsScopedList::Warning::Representation
end
class Warning
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ComputeBeta::CommitmentsScopedList::Warning::Datum, decorator: Google::Apis::ComputeBeta::CommitmentsScopedList::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 Condition class Condition
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -3380,6 +3574,8 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :access_configs, as: 'accessConfigs', class: Google::Apis::ComputeBeta::AccessConfig, decorator: Google::Apis::ComputeBeta::AccessConfig::Representation collection :access_configs, as: 'accessConfigs', class: Google::Apis::ComputeBeta::AccessConfig, decorator: Google::Apis::ComputeBeta::AccessConfig::Representation
collection :alias_ip_ranges, as: 'aliasIpRanges', class: Google::Apis::ComputeBeta::AliasIpRange, decorator: Google::Apis::ComputeBeta::AliasIpRange::Representation
property :kind, as: 'kind' property :kind, as: 'kind'
property :name, as: 'name' property :name, as: 'name'
property :network, as: 'network' property :network, as: 'network'
@ -3411,6 +3607,22 @@ module Google
end end
end end
class NetworksAddPeeringRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :auto_create_routes, as: 'autoCreateRoutes'
property :name, as: 'name'
property :peer_network, as: 'peerNetwork'
end
end
class NetworksRemovePeeringRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
end
end
class Operation class Operation
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -3584,6 +3796,32 @@ module Google
end end
end end
class ProjectsDisableXpnResourceRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :xpn_resource, as: 'xpnResource', class: Google::Apis::ComputeBeta::XpnResourceId, decorator: Google::Apis::ComputeBeta::XpnResourceId::Representation
end
end
class ProjectsEnableXpnResourceRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :xpn_resource, as: 'xpnResource', class: Google::Apis::ComputeBeta::XpnResourceId, decorator: Google::Apis::ComputeBeta::XpnResourceId::Representation
end
end
class ProjectsGetXpnResources
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
collection :resources, as: 'resources', class: Google::Apis::ComputeBeta::XpnResourceId, decorator: Google::Apis::ComputeBeta::XpnResourceId::Representation
end
end
class ProjectsListXpnHostsRequest class ProjectsListXpnHostsRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -3747,6 +3985,14 @@ module Google
end end
end end
class ResourceCommitment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :amount, as: 'amount'
property :type, as: 'type'
end
end
class ResourceGroupReference class ResourceGroupReference
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -4081,7 +4327,10 @@ module Google
property :kind, as: 'kind' property :kind, as: 'kind'
property :name, as: 'name' property :name, as: 'name'
property :network, as: 'network' property :network, as: 'network'
property :private_ip_google_access, as: 'privateIpGoogleAccess'
property :region, as: 'region' property :region, as: 'region'
collection :secondary_ip_ranges, as: 'secondaryIpRanges', class: Google::Apis::ComputeBeta::SubnetworkSecondaryRange, decorator: Google::Apis::ComputeBeta::SubnetworkSecondaryRange::Representation
property :self_link, as: 'selfLink' property :self_link, as: 'selfLink'
end end
end end
@ -4110,6 +4359,14 @@ module Google
end end
end end
class SubnetworkSecondaryRange
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ip_cidr_range, as: 'ipCidrRange'
property :range_name, as: 'rangeName'
end
end
class SubnetworksExpandIpCidrRangeRequest class SubnetworksExpandIpCidrRangeRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -4455,6 +4712,46 @@ module Google
end end
end end
class TargetTcpProxiesSetBackendServiceRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :service, as: 'service'
end
end
class TargetTcpProxiesSetProxyHeaderRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :proxy_header, as: 'proxyHeader'
end
end
class TargetTcpProxy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :proxy_header, as: 'proxyHeader'
property :self_link, as: 'selfLink'
property :service, as: 'service'
end
end
class TargetTcpProxyList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeBeta::TargetTcpProxy, decorator: Google::Apis::ComputeBeta::TargetTcpProxy::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
class TargetVpnGateway class TargetVpnGateway
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -4729,6 +5026,14 @@ module Google
end end
end end
class XpnResourceId
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :type, as: 'type'
end
end
class Zone class Zone
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -1053,6 +1053,117 @@ module Google
end end
end end
# A BackendBucket resource. This resource defines a Cloud Storage bucket.
class BackendBucket
include Google::Apis::Core::Hashable
# Cloud Storage bucket name.
# Corresponds to the JSON property `bucketName`
# @return [String]
attr_accessor :bucket_name
# [Output Only] Creation timestamp in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# An optional textual description of the resource; provided by the client when
# the resource is created.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# If true, enable Cloud CDN for this BackendBucket.
# Corresponds to the JSON property `enableCdn`
# @return [Boolean]
attr_accessor :enable_cdn
alias_method :enable_cdn?, :enable_cdn
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Type of the resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of the resource. Provided by the client when the resource is created. The
# name must be 1-63 characters long, and comply with RFC1035. Specifically, the
# name must be 1-63 characters long and match the regular expression [a-z]([-a-
# z0-9]*[a-z0-9])? which means the first character must be a lowercase letter,
# and all 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
# [Output Only] Server-defined URL for the 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)
@bucket_name = args[:bucket_name] if args.key?(:bucket_name)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@enable_cdn = args[:enable_cdn] if args.key?(:enable_cdn)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
# Contains a list of BackendBucket resources.
class BackendBucketList
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 BackendBucket resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ComputeV1::BackendBucket>]
attr_accessor :items
# Type of resource.
# 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
# A BackendService resource. This resource defines a group of backend virtual # A BackendService resource. This resource defines a group of backend virtual
# machines and their serving capacity. # machines and their serving capacity.
class BackendService class BackendService
@ -1154,7 +1265,7 @@ module Google
attr_accessor :port_name attr_accessor :port_name
# The protocol this BackendService uses to communicate with backends. # The protocol this BackendService uses to communicate with backends.
# Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP. # Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
# For internal load balancing, the possible values are TCP and UDP, and the # For internal load balancing, the possible values are TCP and UDP, and the
# default is TCP. # default is TCP.
# Corresponds to the JSON property `protocol` # Corresponds to the JSON property `protocol`
@ -1305,7 +1416,11 @@ module Google
# @return [String] # @return [String]
attr_accessor :kind attr_accessor :kind
# [Output Only] A token used to continue a truncated list request. # [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` # Corresponds to the JSON property `nextPageToken`
# @return [String] # @return [String]
attr_accessor :next_page_token attr_accessor :next_page_token
@ -1786,7 +1901,8 @@ module Google
# requests. If the number of results is larger than maxResults, use the # 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 # nextPageToken as a value for the query parameter pageToken in the next list
# request. Subsequent list requests will have their own nextPageToken to # request. Subsequent list requests will have their own nextPageToken to
# continue paging through the results. # continue paging through the results. Acceptable values are 0 to 500, inclusive.
# (Default: 500)
# Corresponds to the JSON property `nextPageToken` # Corresponds to the JSON property `nextPageToken`
# @return [String] # @return [String]
attr_accessor :next_page_token attr_accessor :next_page_token
@ -1829,7 +1945,11 @@ module Google
# @return [String] # @return [String]
attr_accessor :kind attr_accessor :kind
# [Output Only] A token used to continue a truncated list request. # 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` # Corresponds to the JSON property `nextPageToken`
# @return [String] # @return [String]
attr_accessor :next_page_token attr_accessor :next_page_token
@ -2574,10 +2694,10 @@ module Google
# The URL of the target resource to receive the matched traffic. For regional # The URL of the target resource to receive the matched traffic. For regional
# forwarding rules, this target must live in the same region as the forwarding # forwarding rules, this target must live in the same region as the forwarding
# rule. For global forwarding rules, this target must be a global # rule. For global forwarding rules, this target must be a global load balancing
# TargetHttpProxy or TargetHttpsProxy resource. The forwarded traffic must be of # resource. The forwarded traffic must be of a type appropriate to the target
# a type appropriate to the target object. For example, TargetHttpProxy requires # object. For example, TargetHttpProxy requires HTTP traffic, and
# HTTP traffic, and TargetHttpsProxy requires HTTPS traffic. # TargetHttpsProxy requires HTTPS traffic.
# This field is not used for internal load balancing. # This field is not used for internal load balancing.
# Corresponds to the JSON property `target` # Corresponds to the JSON property `target`
# @return [String] # @return [String]
@ -2829,6 +2949,7 @@ module Google
attr_accessor :host attr_accessor :host
# The TCP port number for the health check request. The default value is 80. # The TCP port number for the health check request. The default value is 80.
# Valid values are 1 through 65535.
# Corresponds to the JSON property `port` # Corresponds to the JSON property `port`
# @return [Fixnum] # @return [Fixnum]
attr_accessor :port attr_accessor :port
@ -2876,6 +2997,7 @@ module Google
attr_accessor :host attr_accessor :host
# The TCP port number for the health check request. The default value is 443. # The TCP port number for the health check request. The default value is 443.
# Valid values are 1 through 65535.
# Corresponds to the JSON property `port` # Corresponds to the JSON property `port`
# @return [Fixnum] # @return [Fixnum]
attr_accessor :port attr_accessor :port
@ -3815,8 +3937,9 @@ module Google
attr_accessor :self_link attr_accessor :self_link
# A list of service accounts, with their specified scopes, authorized for this # A list of service accounts, with their specified scopes, authorized for this
# instance. Service accounts generate access tokens that can be accessed through # instance. Only one service account per VM instance is supported.
# the metadata server and used to authenticate applications on the instance. See # Service accounts generate access tokens that can be accessed through the
# metadata server and used to authenticate applications on the instance. See
# Service Accounts for more information. # Service Accounts for more information.
# Corresponds to the JSON property `serviceAccounts` # Corresponds to the JSON property `serviceAccounts`
# @return [Array<Google::Apis::ComputeV1::ServiceAccount>] # @return [Array<Google::Apis::ComputeV1::ServiceAccount>]
@ -6177,7 +6300,7 @@ module Google
# @return [String] # @return [String]
attr_accessor :client_operation_id attr_accessor :client_operation_id
# [Output Only] Creation timestamp in RFC3339 text format. # [Deprecated] This field is deprecated.
# Corresponds to the JSON property `creationTimestamp` # Corresponds to the JSON property `creationTimestamp`
# @return [String] # @return [String]
attr_accessor :creation_timestamp attr_accessor :creation_timestamp
@ -8138,6 +8261,7 @@ module Google
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# The TCP port number for the health check request. The default value is 443. # The TCP port number for the health check request. The default value is 443.
# Valid values are 1 through 65535.
# Corresponds to the JSON property `port` # Corresponds to the JSON property `port`
# @return [Fixnum] # @return [Fixnum]
attr_accessor :port attr_accessor :port
@ -8248,10 +8372,10 @@ module Google
# @return [String] # @return [String]
attr_accessor :self_link attr_accessor :self_link
# [Output Only] The starting byte position of the output that was returned. This # The starting byte position of the output that was returned. This should match
# should match the start parameter sent with the request. If the serial console # the start parameter sent with the request. If the serial console output
# output exceeds the size of the buffer, older output will be overwritten by # exceeds the size of the buffer, older output will be overwritten by newer
# newer content and the start values will be mismatched. # content and the start values will be mismatched.
# Corresponds to the JSON property `start` # Corresponds to the JSON property `start`
# @return [String] # @return [String]
attr_accessor :start attr_accessor :start
@ -8886,6 +9010,7 @@ module Google
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# The TCP port number for the health check request. The default value is 80. # The TCP port number for the health check request. The default value is 80.
# Valid values are 1 through 65535.
# Corresponds to the JSON property `port` # Corresponds to the JSON property `port`
# @return [Fixnum] # @return [Fixnum]
attr_accessor :port attr_accessor :port
@ -9490,8 +9615,8 @@ module Google
end end
end end
# A TargetPool resource. This resource defines a pool of instances, associated # A TargetPool resource. This resource defines a pool of instances, an
# HttpHealthCheck resources, and the fallback target pool. # associated HttpHealthCheck resource, and the fallback target pool.
class TargetPool class TargetPool
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -9537,9 +9662,10 @@ module Google
# @return [Float] # @return [Float]
attr_accessor :failover_ratio attr_accessor :failover_ratio
# A list of URLs to the HttpHealthCheck resource. A member instance in this pool # The URL of the HttpHealthCheck resource. A member instance in this pool is
# is considered healthy if and only if all specified health checks pass. An # considered healthy if and only if the health checks pass. An empty list means
# empty list means all member instances will be considered healthy at all times. # all member instances will be considered healthy at all times. Only
# HttpHealthChecks are supported. Only one health check may be specified.
# Corresponds to the JSON property `healthChecks` # Corresponds to the JSON property `healthChecks`
# @return [Array<String>] # @return [Array<String>]
attr_accessor :health_checks attr_accessor :health_checks
@ -9738,7 +9864,7 @@ module Google
class AddTargetPoolsHealthCheckRequest class AddTargetPoolsHealthCheckRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# A list of HttpHealthCheck resources to add to the target pool. # The HttpHealthCheck to add to the target pool.
# Corresponds to the JSON property `healthChecks` # Corresponds to the JSON property `healthChecks`
# @return [Array<Google::Apis::ComputeV1::HealthCheckReference>] # @return [Array<Google::Apis::ComputeV1::HealthCheckReference>]
attr_accessor :health_checks attr_accessor :health_checks

View File

@ -142,6 +142,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class BackendBucket
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BackendBucketList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BackendService class BackendService
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1700,6 +1712,32 @@ module Google
end end
end end
class BackendBucket
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bucket_name, as: 'bucketName'
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :enable_cdn, as: 'enableCdn'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :self_link, as: 'selfLink'
end
end
class BackendBucketList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeV1::BackendBucket, decorator: Google::Apis::ComputeV1::BackendBucket::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
class BackendService class BackendService
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -80,7 +80,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -283,7 +283,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -361,7 +361,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -565,7 +565,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -705,6 +705,284 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Deletes the specified BackendBucket resource.
# @param [String] project
# Project ID for this request.
# @param [String] backend_bucket
# Name of the BackendBucket resource 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.
# 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::ComputeV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::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_backend_bucket(project, backend_bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, '{project}/global/backendBuckets/{backendBucket}', options)
command.response_representation = Google::Apis::ComputeV1::Operation::Representation
command.response_class = Google::Apis::ComputeV1::Operation
command.params['project'] = project unless project.nil?
command.params['backendBucket'] = backend_bucket unless backend_bucket.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 BackendBucket resource. Get a list of available backend
# buckets by making a list() request.
# @param [String] project
# Project ID for this request.
# @param [String] backend_bucket
# Name of the BackendBucket resource 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::ComputeV1::BackendBucket] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::BackendBucket]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_backend_bucket(project, backend_bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/global/backendBuckets/{backendBucket}', options)
command.response_representation = Google::Apis::ComputeV1::BackendBucket::Representation
command.response_class = Google::Apis::ComputeV1::BackendBucket
command.params['project'] = project unless project.nil?
command.params['backendBucket'] = backend_bucket unless backend_bucket.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
# Creates a BackendBucket resource in the specified project using the data
# included in the request.
# @param [String] project
# Project ID for this request.
# @param [Google::Apis::ComputeV1::BackendBucket] backend_bucket_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::ComputeV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_backend_bucket(project, backend_bucket_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/global/backendBuckets', options)
command.request_representation = Google::Apis::ComputeV1::BackendBucket::Representation
command.request_object = backend_bucket_object
command.response_representation = Google::Apis::ComputeV1::Operation::Representation
command.response_class = Google::Apis::ComputeV1::Operation
command.params['project'] = project unless project.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 the list of BackendBucket resources available to the specified
# project.
# @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. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name.
# You can also sort results in descending order based on the creation timestamp
# using orderBy="creationTimestamp desc". This sorts results based on the
# creationTimestamp field in reverse chronological order (newest result first).
# Use this to sort resources like operations so that the newest operation is
# returned first.
# Currently, only sorting by name or creationTimestamp desc is supported.
# @param [String] page_token
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
# a previous list request to get the next page of results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeV1::BackendBucketList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::BackendBucketList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_backend_buckets(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/global/backendBuckets', options)
command.response_representation = Google::Apis::ComputeV1::BackendBucketList::Representation
command.response_class = Google::Apis::ComputeV1::BackendBucketList
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
# Updates the specified BackendBucket resource with the data included in the
# request. This method supports patch semantics.
# @param [String] project
# Project ID for this request.
# @param [String] backend_bucket
# Name of the BackendBucket resource to update.
# @param [Google::Apis::ComputeV1::BackendBucket] backend_bucket_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::ComputeV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_backend_bucket(project, backend_bucket, backend_bucket_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, '{project}/global/backendBuckets/{backendBucket}', options)
command.request_representation = Google::Apis::ComputeV1::BackendBucket::Representation
command.request_object = backend_bucket_object
command.response_representation = Google::Apis::ComputeV1::Operation::Representation
command.response_class = Google::Apis::ComputeV1::Operation
command.params['project'] = project unless project.nil?
command.params['backendBucket'] = backend_bucket unless backend_bucket.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
# Updates the specified BackendBucket resource with the data included in the
# request.
# @param [String] project
# Project ID for this request.
# @param [String] backend_bucket
# Name of the BackendBucket resource to update.
# @param [Google::Apis::ComputeV1::BackendBucket] backend_bucket_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::ComputeV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::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 update_backend_bucket(project, backend_bucket, backend_bucket_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, '{project}/global/backendBuckets/{backendBucket}', options)
command.request_representation = Google::Apis::ComputeV1::BackendBucket::Representation
command.request_object = backend_bucket_object
command.response_representation = Google::Apis::ComputeV1::Operation::Representation
command.response_class = Google::Apis::ComputeV1::Operation
command.params['project'] = project unless project.nil?
command.params['backendBucket'] = backend_bucket unless backend_bucket.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 the list of all BackendService resources, regional and global, # Retrieves the list of all BackendService resources, regional and global,
# available to the specified project. # available to the specified project.
# @param [String] project # @param [String] project
@ -734,7 +1012,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -970,7 +1248,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -1135,7 +1413,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -1256,7 +1534,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -1334,7 +1612,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -1391,6 +1669,7 @@ module Google
# @param [String] disk # @param [String] disk
# Name of the persistent disk to snapshot. # Name of the persistent disk to snapshot.
# @param [Google::Apis::ComputeV1::Snapshot] snapshot_object # @param [Google::Apis::ComputeV1::Snapshot] snapshot_object
# @param [Boolean] guest_flush
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -1412,7 +1691,7 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def create_disk_snapshot(project, zone, disk, snapshot_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) def create_disk_snapshot(project, zone, disk, snapshot_object = nil, guest_flush: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/zones/{zone}/disks/{disk}/createSnapshot', options) command = make_simple_command(:post, '{project}/zones/{zone}/disks/{disk}/createSnapshot', options)
command.request_representation = Google::Apis::ComputeV1::Snapshot::Representation command.request_representation = Google::Apis::ComputeV1::Snapshot::Representation
command.request_object = snapshot_object command.request_object = snapshot_object
@ -1421,6 +1700,7 @@ module Google
command.params['project'] = project unless project.nil? command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil? command.params['zone'] = zone unless zone.nil?
command.params['disk'] = disk unless disk.nil? command.params['disk'] = disk unless disk.nil?
command.query['guestFlush'] = guest_flush unless guest_flush.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil? command.query['userIp'] = user_ip unless user_ip.nil?
@ -1589,7 +1869,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -1826,7 +2106,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -1986,7 +2266,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -2190,7 +2470,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -2429,7 +2709,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -2623,7 +2903,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -2742,7 +3022,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -2894,7 +3174,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -3087,7 +3367,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -3365,7 +3645,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -3643,7 +3923,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -4005,7 +4285,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -4133,7 +4413,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -4394,7 +4674,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -4766,7 +5046,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -4973,7 +5253,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -5057,7 +5337,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -5349,7 +5629,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -5473,7 +5753,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -5751,9 +6031,10 @@ module Google
# @param [Fixnum] port # @param [Fixnum] port
# Specifies which COM or serial port to retrieve data from. # Specifies which COM or serial port to retrieve data from.
# @param [String] start # @param [String] start
# For the initial request, leave this field unspecified. For subsequent calls, # Returns output starting from a specific byte position. Use this to page
# this field should be set to the next value that was returned in the previous # through output when the output is too large to return in a single request. For
# call. # the initial request, leave this field unspecified. For subsequent calls, this
# field should be set to the next value returned in the previous call.
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -5862,7 +6143,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -6133,7 +6414,8 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Sets the service account on the instance. # Sets the service account on the instance. For more information, read Changing
# the service account and access scopes for an instance.
# @param [String] project # @param [String] project
# Project ID for this request. # Project ID for this request.
# @param [String] zone # @param [String] zone
@ -6421,7 +6703,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -6542,7 +6824,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -6736,7 +7018,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -7167,7 +7449,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -7507,7 +7789,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -7912,7 +8194,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -8274,7 +8556,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -8359,7 +8641,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -8566,7 +8848,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -8683,7 +8965,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -8760,7 +9042,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -9005,7 +9287,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -9333,7 +9615,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -9492,7 +9774,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -9686,7 +9968,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -9763,7 +10045,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -10011,7 +10293,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -10206,7 +10488,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -10441,7 +10723,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -10600,7 +10882,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -10805,7 +11087,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -10971,7 +11253,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -11220,7 +11502,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -11550,7 +11832,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -11750,7 +12032,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -11955,7 +12237,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -12191,7 +12473,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -12393,7 +12675,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -12598,7 +12880,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -12758,7 +13040,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.
@ -12875,7 +13157,7 @@ module Google
# The maximum number of results per page that should be returned. If the number # 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 # 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 # nextPageToken that can be used to get the next page of results in subsequent
# list requests. # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
# @param [String] order_by # @param [String] order_by
# Sorts list results by a certain order. By default, results are returned in # Sorts list results by a certain order. By default, results are returned in
# alphanumerical order based on the resource name. # alphanumerical order based on the resource name.

View File

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

View File

@ -1629,7 +1629,8 @@ module Google
# @return [String] # @return [String]
attr_accessor :content_language attr_accessor :content_language
# The type of data feed. # The type of data feed. For product inventory feeds, only feeds for local
# stores, not online stores, are supported.
# Corresponds to the JSON property `contentType` # Corresponds to the JSON property `contentType`
# @return [String] # @return [String]
attr_accessor :content_type attr_accessor :content_type

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/dataflow # @see https://cloud.google.com/dataflow
module DataflowV1b3 module DataflowV1b3
VERSION = 'V1b3' VERSION = 'V1b3'
REVISION = '20170210' REVISION = '20170303'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

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/dataproc/ # @see https://cloud.google.com/dataproc/
module DataprocV1 module DataprocV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20170207' REVISION = '20170228'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

File diff suppressed because it is too large Load Diff

View File

@ -22,84 +22,18 @@ module Google
module Apis module Apis
module DataprocV1 module DataprocV1
class YarnApplication
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class QueryList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class HadoopJob
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DiagnoseClusterRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DiskConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ClusterOperationMetadata
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 HiveJob
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DiagnoseClusterResults
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ClusterConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PySparkJob
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GceClusterConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ClusterMetrics class ClusterMetrics
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class AcceleratorConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LoggingConfig class LoggingConfig
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -142,13 +76,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class JobScheduling class InstanceGroupConfig
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class InstanceGroupConfig class JobScheduling
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -256,147 +190,91 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class YarnApplication class HadoopJob
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name' include Google::Apis::Core::JsonObjectSupport
property :tracking_url, as: 'trackingUrl'
property :progress, as: 'progress'
property :state, as: 'state'
end
end end
class QueryList class QueryList
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
collection :queries, as: 'queries' include Google::Apis::Core::JsonObjectSupport
end
end end
class HadoopJob class YarnApplication
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
collection :jar_file_uris, as: 'jarFileUris'
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
hash :properties, as: 'properties' include Google::Apis::Core::JsonObjectSupport
collection :args, as: 'args'
collection :file_uris, as: 'fileUris'
property :main_class, as: 'mainClass'
collection :archive_uris, as: 'archiveUris'
property :main_jar_file_uri, as: 'mainJarFileUri'
end
end end
class DiagnoseClusterRequest class DiagnoseClusterRequest
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
end include Google::Apis::Core::JsonObjectSupport
end end
class DiskConfig class DiskConfig
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :num_local_ssds, as: 'numLocalSsds' include Google::Apis::Core::JsonObjectSupport
property :boot_disk_size_gb, as: 'bootDiskSizeGb'
end
end end
class ClusterOperationMetadata class ClusterOperationMetadata
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
collection :warnings, as: 'warnings'
hash :labels, as: 'labels'
property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation include Google::Apis::Core::JsonObjectSupport
property :cluster_name, as: 'clusterName'
property :cluster_uuid, as: 'clusterUuid'
property :operation_type, as: 'operationType'
property :description, as: 'description'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end end
class HiveJob class HiveJob
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation
property :query_file_uri, as: 'queryFileUri' include Google::Apis::Core::JsonObjectSupport
collection :jar_file_uris, as: 'jarFileUris'
hash :script_variables, as: 'scriptVariables'
hash :properties, as: 'properties'
property :continue_on_failure, as: 'continueOnFailure'
end end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end end
class DiagnoseClusterResults class DiagnoseClusterResults
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :output_uri, as: 'outputUri' include Google::Apis::Core::JsonObjectSupport
end
end end
class ClusterConfig class ClusterConfig
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :gce_cluster_config, as: 'gceClusterConfig', class: Google::Apis::DataprocV1::GceClusterConfig, decorator: Google::Apis::DataprocV1::GceClusterConfig::Representation
property :software_config, as: 'softwareConfig', class: Google::Apis::DataprocV1::SoftwareConfig, decorator: Google::Apis::DataprocV1::SoftwareConfig::Representation include Google::Apis::Core::JsonObjectSupport
property :master_config, as: 'masterConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation
property :secondary_worker_config, as: 'secondaryWorkerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation
collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1::NodeInitializationAction, decorator: Google::Apis::DataprocV1::NodeInitializationAction::Representation
property :config_bucket, as: 'configBucket'
property :worker_config, as: 'workerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation
end
end end
class PySparkJob class PySparkJob
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
property :main_python_file_uri, as: 'mainPythonFileUri'
collection :archive_uris, as: 'archiveUris'
collection :jar_file_uris, as: 'jarFileUris'
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
hash :properties, as: 'properties' include Google::Apis::Core::JsonObjectSupport
collection :args, as: 'args'
collection :file_uris, as: 'fileUris'
collection :python_file_uris, as: 'pythonFileUris'
end
end end
class GceClusterConfig class GceClusterConfig
# @private class Representation < Google::Apis::Core::JsonRepresentation; end
class Representation < Google::Apis::Core::JsonRepresentation
collection :tags, as: 'tags' include Google::Apis::Core::JsonObjectSupport
property :service_account, as: 'serviceAccount'
property :subnetwork_uri, as: 'subnetworkUri'
property :network_uri, as: 'networkUri'
property :zone_uri, as: 'zoneUri'
property :internal_ip_only, as: 'internalIpOnly'
hash :metadata, as: 'metadata'
collection :service_account_scopes, as: 'serviceAccountScopes'
end
end end
class ClusterMetrics class ClusterMetrics
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
hash :hdfs_metrics, as: 'hdfsMetrics'
hash :yarn_metrics, as: 'yarnMetrics' hash :yarn_metrics, as: 'yarnMetrics'
hash :hdfs_metrics, as: 'hdfsMetrics'
end
end
class AcceleratorConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :accelerator_type_uri, as: 'acceleratorTypeUri'
property :accelerator_count, as: 'acceleratorCount'
end end
end end
@ -429,10 +307,10 @@ module Google
class OperationStatus class OperationStatus
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :state, as: 'state'
property :details, as: 'details'
property :inner_state, as: 'innerState' property :inner_state, as: 'innerState'
property :state_start_time, as: 'stateStartTime' property :state_start_time, as: 'stateStartTime'
property :state, as: 'state'
property :details, as: 'details'
end end
end end
@ -461,6 +339,23 @@ module Google
end end
end end
class InstanceGroupConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :managed_group_config, as: 'managedGroupConfig', class: Google::Apis::DataprocV1::ManagedGroupConfig, decorator: Google::Apis::DataprocV1::ManagedGroupConfig::Representation
property :is_preemptible, as: 'isPreemptible'
property :machine_type_uri, as: 'machineTypeUri'
property :image_uri, as: 'imageUri'
collection :instance_names, as: 'instanceNames'
collection :accelerators, as: 'accelerators', class: Google::Apis::DataprocV1::AcceleratorConfig, decorator: Google::Apis::DataprocV1::AcceleratorConfig::Representation
property :num_instances, as: 'numInstances'
property :disk_config, as: 'diskConfig', class: Google::Apis::DataprocV1::DiskConfig, decorator: Google::Apis::DataprocV1::DiskConfig::Representation
end
end
class JobScheduling class JobScheduling
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -468,35 +363,20 @@ module Google
end end
end end
class InstanceGroupConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :disk_config, as: 'diskConfig', class: Google::Apis::DataprocV1::DiskConfig, decorator: Google::Apis::DataprocV1::DiskConfig::Representation
property :machine_type_uri, as: 'machineTypeUri'
property :managed_group_config, as: 'managedGroupConfig', class: Google::Apis::DataprocV1::ManagedGroupConfig, decorator: Google::Apis::DataprocV1::ManagedGroupConfig::Representation
property :is_preemptible, as: 'isPreemptible'
property :image_uri, as: 'imageUri'
collection :instance_names, as: 'instanceNames'
property :num_instances, as: 'numInstances'
end
end
class ListJobsResponse class ListJobsResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :jobs, as: 'jobs', class: Google::Apis::DataprocV1::Job, decorator: Google::Apis::DataprocV1::Job::Representation collection :jobs, as: 'jobs', class: Google::Apis::DataprocV1::Job, decorator: Google::Apis::DataprocV1::Job::Representation
property :next_page_token, as: 'nextPageToken'
end end
end end
class NodeInitializationAction class NodeInitializationAction
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :executable_file, as: 'executableFile'
property :execution_timeout, as: 'executionTimeout' property :execution_timeout, as: 'executionTimeout'
property :executable_file, as: 'executableFile'
end end
end end
@ -524,16 +404,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
hash :labels, as: 'labels' hash :labels, as: 'labels'
property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation
property :metrics, as: 'metrics', class: Google::Apis::DataprocV1::ClusterMetrics, decorator: Google::Apis::DataprocV1::ClusterMetrics::Representation property :metrics, as: 'metrics', class: Google::Apis::DataprocV1::ClusterMetrics, decorator: Google::Apis::DataprocV1::ClusterMetrics::Representation
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation
property :config, as: 'config', class: Google::Apis::DataprocV1::ClusterConfig, decorator: Google::Apis::DataprocV1::ClusterConfig::Representation property :config, as: 'config', class: Google::Apis::DataprocV1::ClusterConfig, decorator: Google::Apis::DataprocV1::ClusterConfig::Representation
property :cluster_uuid, as: 'clusterUuid' collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation
property :cluster_name, as: 'clusterName' property :cluster_name, as: 'clusterName'
property :cluster_uuid, as: 'clusterUuid'
property :project_id, as: 'projectId' property :project_id, as: 'projectId'
end end
end end
@ -550,6 +430,8 @@ module Google
class OperationMetadata class OperationMetadata
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation
property :operation_type, as: 'operationType' property :operation_type, as: 'operationType'
property :description, as: 'description' property :description, as: 'description'
property :status, as: 'status', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation property :status, as: 'status', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation
@ -563,8 +445,6 @@ module Google
property :start_time, as: 'startTime' property :start_time, as: 'startTime'
collection :warnings, as: 'warnings' collection :warnings, as: 'warnings'
property :insert_time, as: 'insertTime' property :insert_time, as: 'insertTime'
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation
end end
end end
@ -587,15 +467,15 @@ module Google
class PigJob class PigJob
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :continue_on_failure, as: 'continueOnFailure'
property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation
property :query_file_uri, as: 'queryFileUri' property :query_file_uri, as: 'queryFileUri'
collection :jar_file_uris, as: 'jarFileUris'
hash :script_variables, as: 'scriptVariables' hash :script_variables, as: 'scriptVariables'
collection :jar_file_uris, as: 'jarFileUris'
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
hash :properties, as: 'properties' hash :properties, as: 'properties'
property :continue_on_failure, as: 'continueOnFailure'
end end
end end
@ -620,6 +500,14 @@ module Google
class Job class Job
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :reference, as: 'reference', class: Google::Apis::DataprocV1::JobReference, decorator: Google::Apis::DataprocV1::JobReference::Representation
property :hadoop_job, as: 'hadoopJob', class: Google::Apis::DataprocV1::HadoopJob, decorator: Google::Apis::DataprocV1::HadoopJob::Representation
property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation
property :status, as: 'status', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation
property :driver_control_files_uri, as: 'driverControlFilesUri' property :driver_control_files_uri, as: 'driverControlFilesUri'
property :scheduling, as: 'scheduling', class: Google::Apis::DataprocV1::JobScheduling, decorator: Google::Apis::DataprocV1::JobScheduling::Representation property :scheduling, as: 'scheduling', class: Google::Apis::DataprocV1::JobScheduling, decorator: Google::Apis::DataprocV1::JobScheduling::Representation
@ -629,30 +517,24 @@ module Google
hash :labels, as: 'labels' hash :labels, as: 'labels'
property :driver_output_resource_uri, as: 'driverOutputResourceUri' property :driver_output_resource_uri, as: 'driverOutputResourceUri'
property :spark_sql_job, as: 'sparkSqlJob', class: Google::Apis::DataprocV1::SparkSqlJob, decorator: Google::Apis::DataprocV1::SparkSqlJob::Representation
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation
property :spark_sql_job, as: 'sparkSqlJob', class: Google::Apis::DataprocV1::SparkSqlJob, decorator: Google::Apis::DataprocV1::SparkSqlJob::Representation
property :spark_job, as: 'sparkJob', class: Google::Apis::DataprocV1::SparkJob, decorator: Google::Apis::DataprocV1::SparkJob::Representation property :spark_job, as: 'sparkJob', class: Google::Apis::DataprocV1::SparkJob, decorator: Google::Apis::DataprocV1::SparkJob::Representation
collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1::YarnApplication, decorator: Google::Apis::DataprocV1::YarnApplication::Representation collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1::YarnApplication, decorator: Google::Apis::DataprocV1::YarnApplication::Representation
property :pyspark_job, as: 'pysparkJob', class: Google::Apis::DataprocV1::PySparkJob, decorator: Google::Apis::DataprocV1::PySparkJob::Representation property :pyspark_job, as: 'pysparkJob', class: Google::Apis::DataprocV1::PySparkJob, decorator: Google::Apis::DataprocV1::PySparkJob::Representation
property :reference, as: 'reference', class: Google::Apis::DataprocV1::JobReference, decorator: Google::Apis::DataprocV1::JobReference::Representation
property :hadoop_job, as: 'hadoopJob', class: Google::Apis::DataprocV1::HadoopJob, decorator: Google::Apis::DataprocV1::HadoopJob::Representation
property :status, as: 'status', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation
property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation
end end
end end
class SparkJob class SparkJob
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :archive_uris, as: 'archiveUris'
property :main_jar_file_uri, as: 'mainJarFileUri'
collection :jar_file_uris, as: 'jarFileUris' collection :jar_file_uris, as: 'jarFileUris'
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
@ -660,17 +542,15 @@ module Google
collection :args, as: 'args' collection :args, as: 'args'
collection :file_uris, as: 'fileUris' collection :file_uris, as: 'fileUris'
property :main_class, as: 'mainClass' property :main_class, as: 'mainClass'
collection :archive_uris, as: 'archiveUris'
property :main_jar_file_uri, as: 'mainJarFileUri'
end end
end end
class JobStatus class JobStatus
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :state_start_time, as: 'stateStartTime'
property :state, as: 'state' property :state, as: 'state'
property :details, as: 'details' property :details, as: 'details'
property :state_start_time, as: 'stateStartTime'
end end
end end
@ -691,6 +571,142 @@ module Google
property :state_start_time, as: 'stateStartTime' property :state_start_time, as: 'stateStartTime'
end end
end end
class HadoopJob
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :properties, as: 'properties'
collection :args, as: 'args'
collection :file_uris, as: 'fileUris'
property :main_class, as: 'mainClass'
collection :archive_uris, as: 'archiveUris'
property :main_jar_file_uri, as: 'mainJarFileUri'
collection :jar_file_uris, as: 'jarFileUris'
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
end
end
class QueryList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :queries, as: 'queries'
end
end
class YarnApplication
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :state, as: 'state'
property :name, as: 'name'
property :tracking_url, as: 'trackingUrl'
property :progress, as: 'progress'
end
end
class DiagnoseClusterRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class DiskConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :boot_disk_size_gb, as: 'bootDiskSizeGb'
property :num_local_ssds, as: 'numLocalSsds'
end
end
class ClusterOperationMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
collection :warnings, as: 'warnings'
hash :labels, as: 'labels'
property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation
property :cluster_uuid, as: 'clusterUuid'
property :cluster_name, as: 'clusterName'
property :operation_type, as: 'operationType'
end
end
class HiveJob
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :continue_on_failure, as: 'continueOnFailure'
property :query_file_uri, as: 'queryFileUri'
property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation
collection :jar_file_uris, as: 'jarFileUris'
hash :script_variables, as: 'scriptVariables'
hash :properties, as: 'properties'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class DiagnoseClusterResults
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :output_uri, as: 'outputUri'
end
end
class ClusterConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1::NodeInitializationAction, decorator: Google::Apis::DataprocV1::NodeInitializationAction::Representation
property :config_bucket, as: 'configBucket'
property :worker_config, as: 'workerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation
property :gce_cluster_config, as: 'gceClusterConfig', class: Google::Apis::DataprocV1::GceClusterConfig, decorator: Google::Apis::DataprocV1::GceClusterConfig::Representation
property :software_config, as: 'softwareConfig', class: Google::Apis::DataprocV1::SoftwareConfig, decorator: Google::Apis::DataprocV1::SoftwareConfig::Representation
property :master_config, as: 'masterConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation
property :secondary_worker_config, as: 'secondaryWorkerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation
end
end
class PySparkJob
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :python_file_uris, as: 'pythonFileUris'
property :main_python_file_uri, as: 'mainPythonFileUri'
collection :archive_uris, as: 'archiveUris'
collection :jar_file_uris, as: 'jarFileUris'
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
hash :properties, as: 'properties'
collection :args, as: 'args'
collection :file_uris, as: 'fileUris'
end
end
class GceClusterConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :network_uri, as: 'networkUri'
property :zone_uri, as: 'zoneUri'
hash :metadata, as: 'metadata'
property :internal_ip_only, as: 'internalIpOnly'
collection :service_account_scopes, as: 'serviceAccountScopes'
collection :tags, as: 'tags'
property :service_account, as: 'serviceAccount'
property :subnetwork_uri, as: 'subnetworkUri'
end
end
end end
end end
end end

View File

@ -46,15 +46,14 @@ module Google
super('https://dataproc.googleapis.com/', '') super('https://dataproc.googleapis.com/', '')
end end
# Starts a job cancellation request. To access the job resource after # Gets the resource representation for a cluster in a project.
# cancellation, call regions/`region`/jobs.list or regions/`region`/jobs.get.
# @param [String] project_id # @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to. # Required The ID of the Google Cloud Platform project that the cluster belongs
# to.
# @param [String] region # @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] job_id # @param [String] cluster_name
# Required The job ID. # Required The cluster name.
# @param [Google::Apis::DataprocV1::CancelJobRequest] cancel_job_request_object
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -64,78 +63,61 @@ module Google
# Request-specific options # Request-specific options
# #
# @yield [result, err] Result & error if block supplied # @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object # @yieldparam result [Google::Apis::DataprocV1::Cluster] parsed result object
# @yieldparam err [StandardError] error object if request failed # @yieldparam err [StandardError] error object if request failed
# #
# @return [Google::Apis::DataprocV1::Job] # @return [Google::Apis::DataprocV1::Cluster]
# #
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @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) def get_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options) command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
command.request_representation = Google::Apis::DataprocV1::CancelJobRequest::Representation command.response_representation = Google::Apis::DataprocV1::Cluster::Representation
command.request_object = cancel_job_request_object command.response_class = Google::Apis::DataprocV1::Cluster
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['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil? command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_id.nil? command.params['clusterName'] = cluster_name unless cluster_name.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Gets the resource representation for a job in a project. # Updates a cluster in a project.
# @param [String] project_id # @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to. # Required The ID of the Google Cloud Platform project the cluster belongs to.
# @param [String] region # @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] job_id # @param [String] cluster_name
# Required The job ID. # Required The cluster name.
# @param [String] fields # @param [Google::Apis::DataprocV1::Cluster] cluster_object
# 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 # @param [String] update_mask
# Required Specifies the path, relative to <code>Job</code>, of the field to # Required Specifies the path, relative to <code>Cluster</code>, of the field to
# update. For example, to update the labels of a Job the <code>update_mask</code> # update. For example, to change the number of workers in a cluster to 5, the <
# parameter would be specified as <code>labels</code>, and the PATCH request # code>update_mask</code> parameter would be specified as <code>config.
# body would specify the new value. <strong>Note:</strong> Currently, <code> # worker_config.num_instances</code>, and the PATCH request body would specify
# labels</code> is the only field that can be updated. # 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 # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -145,126 +127,37 @@ module Google
# Request-specific options # Request-specific options
# #
# @yield [result, err] Result & error if block supplied # @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed # @yieldparam err [StandardError] error object if request failed
# #
# @return [Google::Apis::DataprocV1::Job] # @return [Google::Apis::DataprocV1::Operation]
# #
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @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) def patch_cluster(project_id, region, cluster_name, cluster_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 = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
command.request_representation = Google::Apis::DataprocV1::Job::Representation command.request_representation = Google::Apis::DataprocV1::Cluster::Representation
command.request_object = job_object command.request_object = cluster_object
command.response_representation = Google::Apis::DataprocV1::Job::Representation command.response_representation = Google::Apis::DataprocV1::Operation::Representation
command.response_class = Google::Apis::DataprocV1::Job command.response_class = Google::Apis::DataprocV1::Operation
command.params['projectId'] = project_id unless project_id.nil? command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil? command.params['region'] = region unless region.nil?
command.params['jobId'] = job_id unless job_id.nil? command.params['clusterName'] = cluster_name unless cluster_name.nil?
command.query['updateMask'] = update_mask unless update_mask.nil? command.query['updateMask'] = update_mask unless update_mask.nil?
command.query['fields'] = fields unless fields.nil? command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Submits a job to a cluster. # Deletes a cluster in a project.
# @param [String] project_id # @param [String] project_id
# Required The ID of the Google Cloud Platform project that the job belongs to. # Required The ID of the Google Cloud Platform project that the cluster belongs
# to.
# @param [String] region # @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::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 # @param [String] cluster_name
# Optional If set, the returned jobs list includes only jobs that were submitted # Required The cluster name.
# to the named cluster.
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -274,25 +167,21 @@ module Google
# Request-specific options # Request-specific options
# #
# @yield [result, err] Result & error if block supplied # @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataprocV1::ListJobsResponse] parsed result object # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed # @yieldparam err [StandardError] error object if request failed
# #
# @return [Google::Apis::DataprocV1::ListJobsResponse] # @return [Google::Apis::DataprocV1::Operation]
# #
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @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) def delete_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', options) command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation command.response_representation = Google::Apis::DataprocV1::Operation::Representation
command.response_class = Google::Apis::DataprocV1::ListJobsResponse command.response_class = Google::Apis::DataprocV1::Operation
command.params['projectId'] = project_id unless project_id.nil? command.params['projectId'] = project_id unless project_id.nil?
command.params['region'] = region unless region.nil? command.params['region'] = region unless region.nil?
command.query['filter'] = filter unless filter.nil? command.params['clusterName'] = cluster_name unless cluster_name.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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
@ -339,43 +228,6 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end 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. # Lists all regions/`region`/clusters in a project.
# @param [String] project_id # @param [String] project_id
# Required The ID of the Google Cloud Platform project that the cluster belongs # Required The ID of the Google Cloud Platform project that the cluster belongs
@ -466,110 +318,6 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Updates a cluster in a project.
# @param [String] project_id
# 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.
# @param [String] cluster_name
# Required The cluster name.
# @param [Google::Apis::DataprocV1::Cluster] cluster_object
# @param [String] update_mask
# 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
# Available to 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 patch_cluster(project_id, region, cluster_name, cluster_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
command.request_representation = Google::Apis::DataprocV1::Cluster::Representation
command.request_object = cluster_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['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
# 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.
# @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::Cluster] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataprocV1::Cluster]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
command.response_representation = Google::Apis::DataprocV1::Cluster::Representation
command.response_class = Google::Apis::DataprocV1::Cluster
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
# Starts asynchronous cancellation on a long-running operation. The server makes # 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 # 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. # server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
@ -646,12 +394,12 @@ module Google
# name schemes, such as users/*/operations. # name schemes, such as users/*/operations.
# @param [String] name # @param [String] name
# The name of the operation collection. # The name of the operation collection.
# @param [String] filter
# The standard list filter.
# @param [String] page_token # @param [String] page_token
# The standard list page token. # The standard list page token.
# @param [Fixnum] page_size # @param [Fixnum] page_size
# The standard list page size. # The standard list page size.
# @param [String] filter
# The standard list filter.
# @param [String] fields # @param [String] fields
# Selector specifying which fields to include in a partial response. # Selector specifying which fields to include in a partial response.
# @param [String] quota_user # @param [String] quota_user
@ -669,14 +417,14 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @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, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options) command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation
command.response_class = Google::Apis::DataprocV1::ListOperationsResponse command.response_class = Google::Apis::DataprocV1::ListOperationsResponse
command.params['name'] = name unless name.nil? 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['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
@ -713,6 +461,258 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end 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] cluster_name
# Optional If set, the returned jobs list includes only jobs that were submitted
# to the named cluster.
# @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] 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, cluster_name: nil, filter: nil, job_state_matcher: nil, page_token: nil, page_size: 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['clusterName'] = cluster_name unless cluster_name.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['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 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
# 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
# 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
protected protected
def apply_command_defaults(command) def apply_command_defaults(command)

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -22,109 +22,13 @@ module Google
module Apis module Apis
module DatastoreV1 module DatastoreV1
class AllocateIdsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Query
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 EntityResult
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Value class Value
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class PartitionId class ReadOptions
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 LookupRequest
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 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 class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -136,19 +40,91 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class CommitRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Query
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 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 KindExpression
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class LatLng class PropertyFilter
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class Key class PathElement
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RollbackResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -166,43 +142,61 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end 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 MutationResult
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end 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 GqlQuery
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class Filter class Mutation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CommitResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -214,7 +208,13 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class RollbackRequest class LookupRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LatLng
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
@ -226,10 +226,52 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class AllocateIdsResponse class Value
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation 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
end end
end end
@ -237,31 +279,27 @@ module Google
class Query class Query
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :offset, as: 'offset'
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
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 :limit, as: 'limit'
property :filter, as: 'filter', class: Google::Apis::DatastoreV1::Filter, decorator: Google::Apis::DatastoreV1::Filter::Representation 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
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
end end
end end
class PropertyFilter class RollbackRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation property :transaction, :base64 => true, as: 'transaction'
property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
property :op, as: 'op'
end end
end end
@ -269,101 +307,36 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :cursor, :base64 => true, as: 'cursor' 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 :entity, as: 'entity', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
end property :version, as: 'version'
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
end end
class GqlQueryParameter class GqlQueryParameter
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :cursor, :base64 => true, as: 'cursor'
property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation 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
end end
end end
@ -374,6 +347,28 @@ module Google
end end
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 class AllocateIdsRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -382,6 +377,72 @@ module Google
end end
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 class LookupResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -394,56 +455,12 @@ module Google
end end
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 class BeginTransactionRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
end end
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 class Key
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -454,65 +471,23 @@ module Google
end end
end end
class PropertyReference class RunQueryResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name' 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
end end
class Projection class Entity
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation hash :properties, as: 'properties', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
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 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 :upsert, as: 'upsert', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
end
end
class ReadOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
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 :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
end end
@ -520,21 +495,35 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :query_string, as: 'queryString' 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 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 :positional_bindings, as: 'positionalBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation
end end
end end
class Filter class Mutation
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :property_filter, as: 'propertyFilter', class: Google::Apis::DatastoreV1::PropertyFilter, decorator: Google::Apis::DatastoreV1::PropertyFilter::Representation property :insert, as: 'insert', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
property :composite_filter, as: 'compositeFilter', class: Google::Apis::DatastoreV1::CompositeFilter, decorator: Google::Apis::DatastoreV1::CompositeFilter::Representation 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
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :mutation_results, as: 'mutationResults', class: Google::Apis::DatastoreV1::MutationResult, decorator: Google::Apis::DatastoreV1::MutationResult::Representation
property :index_updates, as: 'indexUpdates'
end end
end end
@ -552,10 +541,21 @@ module Google
end end
end end
class RollbackRequest class LookupRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :transaction, :base64 => true, as: 'transaction' 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'
end end
end end

View File

@ -51,11 +51,11 @@ module Google
# @param [String] project_id # @param [String] project_id
# The ID of the project against which to make the request. # The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::RunQueryRequest] run_query_request_object # @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 # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -68,115 +68,15 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) def run_project_query(project_id, run_query_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/projects/{projectId}:runQuery', options) command = make_simple_command(:post, 'v1/projects/{projectId}:runQuery', options)
command.request_representation = Google::Apis::DatastoreV1::RunQueryRequest::Representation command.request_representation = Google::Apis::DatastoreV1::RunQueryRequest::Representation
command.request_object = run_query_request_object command.request_object = run_query_request_object
command.response_representation = Google::Apis::DatastoreV1::RunQueryResponse::Representation command.response_representation = Google::Apis::DatastoreV1::RunQueryResponse::Representation
command.response_class = Google::Apis::DatastoreV1::RunQueryResponse command.response_class = Google::Apis::DatastoreV1::RunQueryResponse
command.params['projectId'] = project_id unless project_id.nil? 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['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Rolls back a transaction.
# @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 [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DatastoreV1::RollbackResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::RollbackResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, 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['fields'] = fields unless fields.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) execute_or_queue_command(command, &block)
end end
@ -184,11 +84,11 @@ module Google
# @param [String] project_id # @param [String] project_id
# The ID of the project against which to make the request. # The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::BeginTransactionRequest] begin_transaction_request_object # @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 # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -201,15 +101,82 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @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) 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 = make_simple_command(:post, 'v1/projects/{projectId}:beginTransaction', options)
command.request_representation = Google::Apis::DatastoreV1::BeginTransactionRequest::Representation command.request_representation = Google::Apis::DatastoreV1::BeginTransactionRequest::Representation
command.request_object = begin_transaction_request_object command.request_object = begin_transaction_request_object
command.response_representation = Google::Apis::DatastoreV1::BeginTransactionResponse::Representation command.response_representation = Google::Apis::DatastoreV1::BeginTransactionResponse::Representation
command.response_class = Google::Apis::DatastoreV1::BeginTransactionResponse command.response_class = Google::Apis::DatastoreV1::BeginTransactionResponse
command.params['projectId'] = project_id unless project_id.nil? 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['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) execute_or_queue_command(command, &block)
end end
@ -218,11 +185,11 @@ module Google
# @param [String] project_id # @param [String] project_id
# The ID of the project against which to make the request. # The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::CommitRequest] commit_request_object # @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 # @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any # Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters. # 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 # @param [Google::Apis::RequestOptions] options
# Request-specific options # Request-specific options
# #
@ -235,15 +202,48 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required # @raise [Google::Apis::AuthorizationError] Authorization is required
def commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) 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 = make_simple_command(:post, 'v1/projects/{projectId}:commit', options)
command.request_representation = Google::Apis::DatastoreV1::CommitRequest::Representation command.request_representation = Google::Apis::DatastoreV1::CommitRequest::Representation
command.request_object = commit_request_object command.request_object = commit_request_object
command.response_representation = Google::Apis::DatastoreV1::CommitResponse::Representation command.response_representation = Google::Apis::DatastoreV1::CommitResponse::Representation
command.response_class = Google::Apis::DatastoreV1::CommitResponse command.response_class = Google::Apis::DatastoreV1::CommitResponse
command.params['projectId'] = project_id unless project_id.nil? 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['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Rolls back a transaction.
# @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] quota_user
# Available to 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::RollbackResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatastoreV1::RollbackResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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)
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?
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/deployment-manager/ # @see https://cloud.google.com/deployment-manager/
module DeploymentmanagerV2 module DeploymentmanagerV2
VERSION = 'V2' VERSION = 'V2'
REVISION = '20170126' REVISION = '20170302'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -25,6 +25,18 @@ module Google
# Specifies the audit configuration for a service. It consists of which # Specifies the audit configuration for a service. It consists of which
# permission types are logged, and what identities, if any, are exempted from # permission types are logged, and what identities, if any, are exempted from
# logging. An AuditConifg must have one or more AuditLogConfigs. # logging. An AuditConifg must have one or more AuditLogConfigs.
# If there are AuditConfigs for both `allServices` and a specific service, the
# union of the two AuditConfigs is used for that service: the log_types
# specified in each AuditConfig are enabled, and the exempted_members in each
# AuditConfig are exempted. Example Policy with multiple AuditConfigs: ` "
# audit_configs": [ ` "service": "allServices" "audit_log_configs": [ ` "
# log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] `, ` "
# log_type": "DATA_WRITE", `, ` "log_type": "ADMIN_READ", ` ] `, ` "service": "
# fooservice@googleapis.com" "audit_log_configs": [ ` "log_type": "DATA_READ", `,
# ` "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] ` ] `
# ] ` For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
# logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.
# com from DATA_WRITE logging.
class AuditConfig class AuditConfig
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -33,9 +45,7 @@ module Google
# @return [Array<Google::Apis::DeploymentmanagerV2::AuditLogConfig>] # @return [Array<Google::Apis::DeploymentmanagerV2::AuditLogConfig>]
attr_accessor :audit_log_configs 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` # Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>] # @return [Array<String>]
attr_accessor :exempted_members attr_accessor :exempted_members

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/cloud-dns # @see https://developers.google.com/cloud-dns
module DnsV1 module DnsV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20170130' REVISION = '20170221'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/cloud-dns # @see https://developers.google.com/cloud-dns
module DnsV2beta1 module DnsV2beta1
VERSION = 'V2beta1' VERSION = 'V2beta1'
REVISION = '20170130' REVISION = '20170221'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/bid-manager/ # @see https://developers.google.com/bid-manager/
module DoubleclickbidmanagerV1 module DoubleclickbidmanagerV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20161010' REVISION = '20170224'
end end
end end
end end

View File

@ -93,7 +93,7 @@ module Google
# The IDs of the specified filter type. This is used to filter entities to fetch. # The IDs of the specified filter type. This is used to filter entities to fetch.
# At least one ID must be specified. Only one ID is allowed for the # At least one ID must be specified. Only one ID is allowed for the
# ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter types # ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter types,
# all IDs must be from the same Advertiser. # all IDs must be from the same Advertiser.
# Corresponds to the JSON property `filterIds` # Corresponds to the JSON property `filterIds`
# @return [Array<String>] # @return [Array<String>]

View File

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

View File

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

View File

@ -617,11 +617,12 @@ module Google
end end
end end
# Representation of a change to a file. # Representation of a change to a file or Team Drive.
class Change class Change
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Whether the file has been deleted. # Whether the file or Team Drive has been removed from this list of changes, for
# example by deletion or loss of access.
# Corresponds to the JSON property `deleted` # Corresponds to the JSON property `deleted`
# @return [Boolean] # @return [Boolean]
attr_accessor :deleted attr_accessor :deleted
@ -657,6 +658,21 @@ module Google
# @return [String] # @return [String]
attr_accessor :self_link attr_accessor :self_link
# Representation of a Team Drive.
# Corresponds to the JSON property `teamDrive`
# @return [Google::Apis::DriveV2::TeamDrive]
attr_accessor :team_drive
# The ID of the Team Drive associated with this change.
# Corresponds to the JSON property `teamDriveId`
# @return [String]
attr_accessor :team_drive_id
# The type of the change. Possible values are file and teamDrive.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -670,6 +686,9 @@ module Google
@kind = args[:kind] if args.key?(:kind) @kind = args[:kind] if args.key?(:kind)
@modification_date = args[:modification_date] if args.key?(:modification_date) @modification_date = args[:modification_date] if args.key?(:modification_date)
@self_link = args[:self_link] if args.key?(:self_link) @self_link = args[:self_link] if args.key?(:self_link)
@team_drive = args[:team_drive] if args.key?(:team_drive)
@team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id)
@type = args[:type] if args.key?(:type)
end end
end end
@ -698,6 +717,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :largest_change_id attr_accessor :largest_change_id
# The starting page token for future changes. This will be present only if the
# end of the current changes list has been reached.
# Corresponds to the JSON property `newStartPageToken`
# @return [String]
attr_accessor :new_start_page_token
# A link to the next page of changes. # A link to the next page of changes.
# Corresponds to the JSON property `nextLink` # Corresponds to the JSON property `nextLink`
# @return [String] # @return [String]
@ -726,6 +751,7 @@ module Google
@items = args[:items] if args.key?(:items) @items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind) @kind = args[:kind] if args.key?(:kind)
@largest_change_id = args[:largest_change_id] if args.key?(:largest_change_id) @largest_change_id = args[:largest_change_id] if args.key?(:largest_change_id)
@new_start_page_token = args[:new_start_page_token] if args.key?(:new_start_page_token)
@next_link = args[:next_link] if args.key?(:next_link) @next_link = args[:next_link] if args.key?(:next_link)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token) @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@self_link = args[:self_link] if args.key?(:self_link) @self_link = args[:self_link] if args.key?(:self_link)
@ -1222,19 +1248,28 @@ module Google
attr_accessor :app_data_contents attr_accessor :app_data_contents
alias_method :app_data_contents?, :app_data_contents alias_method :app_data_contents?, :app_data_contents
# Whether the current user can comment on the file. # Whether the current user can comment on the file. Deprecated: use capabilities/
# canComment.
# Corresponds to the JSON property `canComment` # Corresponds to the JSON property `canComment`
# @return [Boolean] # @return [Boolean]
attr_accessor :can_comment attr_accessor :can_comment
alias_method :can_comment?, :can_comment alias_method :can_comment?, :can_comment
# Whether the current user has read access to the Revisions resource of the file. # Whether the current user has read access to the Revisions resource of the file.
# Deprecated: use capabilities/canReadRevisions.
# Corresponds to the JSON property `canReadRevisions` # Corresponds to the JSON property `canReadRevisions`
# @return [Boolean] # @return [Boolean]
attr_accessor :can_read_revisions attr_accessor :can_read_revisions
alias_method :can_read_revisions?, :can_read_revisions alias_method :can_read_revisions?, :can_read_revisions
# Whether the file can be copied by the current user. # Capabilities the current user has on the file. Each capability corresponds to
# a fine-grained action that a user may take.
# Corresponds to the JSON property `capabilities`
# @return [Google::Apis::DriveV2::File::Capabilities]
attr_accessor :capabilities
# Whether the file can be copied by the current user. Deprecated: use
# capabilities/canCopy.
# Corresponds to the JSON property `copyable` # Corresponds to the JSON property `copyable`
# @return [Boolean] # @return [Boolean]
attr_accessor :copyable attr_accessor :copyable
@ -1261,7 +1296,8 @@ module Google
# @return [String] # @return [String]
attr_accessor :download_url attr_accessor :download_url
# Whether the file can be edited by the current user. # Whether the file can be edited by the current user. Deprecated: use
# capabilities/canEdit.
# Corresponds to the JSON property `editable` # Corresponds to the JSON property `editable`
# @return [Boolean] # @return [Boolean]
attr_accessor :editable attr_accessor :editable
@ -1306,7 +1342,7 @@ module Google
# Folder color as an RGB hex string if the file is a folder. The list of # Folder color as an RGB hex string if the file is a folder. The list of
# supported colors is available in the folderColorPalette field of the About # supported colors is available in the folderColorPalette field of the About
# resource. If an unsupported color is specified, it will be changed to the # resource. If an unsupported color is specified, it will be changed to the
# closest color in the palette. # closest color in the palette. Not populated for Team Drive files.
# Corresponds to the JSON property `folderColorRgb` # Corresponds to the JSON property `folderColorRgb`
# @return [String] # @return [String]
attr_accessor :folder_color_rgb attr_accessor :folder_color_rgb
@ -1320,6 +1356,13 @@ module Google
# @return [String] # @return [String]
attr_accessor :full_file_extension attr_accessor :full_file_extension
# Whether any users are granted file access directly on this file. This field is
# only populated for Team Drive files.
# Corresponds to the JSON property `hasAugmentedPermissions`
# @return [Boolean]
attr_accessor :has_augmented_permissions
alias_method :has_augmented_permissions?, :has_augmented_permissions
# Whether this file has a thumbnail. # Whether this file has a thumbnail.
# Corresponds to the JSON property `hasThumbnail` # Corresponds to the JSON property `hasThumbnail`
# @return [Boolean] # @return [Boolean]
@ -1430,18 +1473,19 @@ module Google
# @return [String] # @return [String]
attr_accessor :original_filename attr_accessor :original_filename
# Whether the file is owned by the current user. # Whether the file is owned by the current user. Not populated for Team Drive
# files.
# Corresponds to the JSON property `ownedByMe` # Corresponds to the JSON property `ownedByMe`
# @return [Boolean] # @return [Boolean]
attr_accessor :owned_by_me attr_accessor :owned_by_me
alias_method :owned_by_me?, :owned_by_me alias_method :owned_by_me?, :owned_by_me
# Name(s) of the owner(s) of this file. # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
# Corresponds to the JSON property `ownerNames` # Corresponds to the JSON property `ownerNames`
# @return [Array<String>] # @return [Array<String>]
attr_accessor :owner_names attr_accessor :owner_names
# The owner(s) of this file. # The owner(s) of this file. Not populated for Team Drive files.
# Corresponds to the JSON property `owners` # Corresponds to the JSON property `owners`
# @return [Array<Google::Apis::DriveV2::User>] # @return [Array<Google::Apis::DriveV2::User>]
attr_accessor :owners attr_accessor :owners
@ -1454,7 +1498,8 @@ module Google
# @return [Array<Google::Apis::DriveV2::ParentReference>] # @return [Array<Google::Apis::DriveV2::ParentReference>]
attr_accessor :parents attr_accessor :parents
# The list of permissions for users with access to this file. # The list of permissions for users with access to this file. Not populated for
# Team Drive files.
# Corresponds to the JSON property `permissions` # Corresponds to the JSON property `permissions`
# @return [Array<Google::Apis::DriveV2::Permission>] # @return [Array<Google::Apis::DriveV2::Permission>]
attr_accessor :permissions attr_accessor :permissions
@ -1475,12 +1520,13 @@ module Google
attr_accessor :self_link attr_accessor :self_link
# Whether the file's sharing settings can be modified by the current user. # Whether the file's sharing settings can be modified by the current user.
# Deprecated: use capabilities/canShare.
# Corresponds to the JSON property `shareable` # Corresponds to the JSON property `shareable`
# @return [Boolean] # @return [Boolean]
attr_accessor :shareable attr_accessor :shareable
alias_method :shareable?, :shareable alias_method :shareable?, :shareable
# Whether the file has been shared. # Whether the file has been shared. Not populated for Team Drive files.
# Corresponds to the JSON property `shared` # Corresponds to the JSON property `shared`
# @return [Boolean] # @return [Boolean]
attr_accessor :shared attr_accessor :shared
@ -1503,6 +1549,11 @@ module Google
# @return [Array<String>] # @return [Array<String>]
attr_accessor :spaces attr_accessor :spaces
# ID of the Team Drive the file resides in.
# Corresponds to the JSON property `teamDriveId`
# @return [String]
attr_accessor :team_drive_id
# A thumbnail for the file. This will only be used if Drive cannot generate a # A thumbnail for the file. This will only be used if Drive cannot generate a
# standard thumbnail. # standard thumbnail.
# Corresponds to the JSON property `thumbnail` # Corresponds to the JSON property `thumbnail`
@ -1525,6 +1576,17 @@ module Google
# @return [String] # @return [String]
attr_accessor :title attr_accessor :title
# The time that the item was trashed (formatted RFC 3339 timestamp). Only
# populated for Team Drive files.
# Corresponds to the JSON property `trashedDate`
# @return [DateTime]
attr_accessor :trashed_date
# Information about a Drive user.
# Corresponds to the JSON property `trashingUser`
# @return [Google::Apis::DriveV2::User]
attr_accessor :trashing_user
# A permission for a file. # A permission for a file.
# Corresponds to the JSON property `userPermission` # Corresponds to the JSON property `userPermission`
# @return [Google::Apis::DriveV2::Permission] # @return [Google::Apis::DriveV2::Permission]
@ -1555,7 +1617,8 @@ module Google
# @return [String] # @return [String]
attr_accessor :web_view_link attr_accessor :web_view_link
# Whether writers can share the document with other users. # Whether writers can share the document with other users. Not populated for
# Team Drive files.
# Corresponds to the JSON property `writersCanShare` # Corresponds to the JSON property `writersCanShare`
# @return [Boolean] # @return [Boolean]
attr_accessor :writers_can_share attr_accessor :writers_can_share
@ -1571,6 +1634,7 @@ module Google
@app_data_contents = args[:app_data_contents] if args.key?(:app_data_contents) @app_data_contents = args[:app_data_contents] if args.key?(:app_data_contents)
@can_comment = args[:can_comment] if args.key?(:can_comment) @can_comment = args[:can_comment] if args.key?(:can_comment)
@can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions) @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
@capabilities = args[:capabilities] if args.key?(:capabilities)
@copyable = args[:copyable] if args.key?(:copyable) @copyable = args[:copyable] if args.key?(:copyable)
@created_date = args[:created_date] if args.key?(:created_date) @created_date = args[:created_date] if args.key?(:created_date)
@default_open_with_link = args[:default_open_with_link] if args.key?(:default_open_with_link) @default_open_with_link = args[:default_open_with_link] if args.key?(:default_open_with_link)
@ -1585,6 +1649,7 @@ module Google
@file_size = args[:file_size] if args.key?(:file_size) @file_size = args[:file_size] if args.key?(:file_size)
@folder_color_rgb = args[:folder_color_rgb] if args.key?(:folder_color_rgb) @folder_color_rgb = args[:folder_color_rgb] if args.key?(:folder_color_rgb)
@full_file_extension = args[:full_file_extension] if args.key?(:full_file_extension) @full_file_extension = args[:full_file_extension] if args.key?(:full_file_extension)
@has_augmented_permissions = args[:has_augmented_permissions] if args.key?(:has_augmented_permissions)
@has_thumbnail = args[:has_thumbnail] if args.key?(:has_thumbnail) @has_thumbnail = args[:has_thumbnail] if args.key?(:has_thumbnail)
@head_revision_id = args[:head_revision_id] if args.key?(:head_revision_id) @head_revision_id = args[:head_revision_id] if args.key?(:head_revision_id)
@icon_link = args[:icon_link] if args.key?(:icon_link) @icon_link = args[:icon_link] if args.key?(:icon_link)
@ -1617,10 +1682,13 @@ module Google
@shared_with_me_date = args[:shared_with_me_date] if args.key?(:shared_with_me_date) @shared_with_me_date = args[:shared_with_me_date] if args.key?(:shared_with_me_date)
@sharing_user = args[:sharing_user] if args.key?(:sharing_user) @sharing_user = args[:sharing_user] if args.key?(:sharing_user)
@spaces = args[:spaces] if args.key?(:spaces) @spaces = args[:spaces] if args.key?(:spaces)
@team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id)
@thumbnail = args[:thumbnail] if args.key?(:thumbnail) @thumbnail = args[:thumbnail] if args.key?(:thumbnail)
@thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link) @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link)
@thumbnail_version = args[:thumbnail_version] if args.key?(:thumbnail_version) @thumbnail_version = args[:thumbnail_version] if args.key?(:thumbnail_version)
@title = args[:title] if args.key?(:title) @title = args[:title] if args.key?(:title)
@trashed_date = args[:trashed_date] if args.key?(:trashed_date)
@trashing_user = args[:trashing_user] if args.key?(:trashing_user)
@user_permission = args[:user_permission] if args.key?(:user_permission) @user_permission = args[:user_permission] if args.key?(:user_permission)
@version = args[:version] if args.key?(:version) @version = args[:version] if args.key?(:version)
@video_media_metadata = args[:video_media_metadata] if args.key?(:video_media_metadata) @video_media_metadata = args[:video_media_metadata] if args.key?(:video_media_metadata)
@ -1629,6 +1697,144 @@ module Google
@writers_can_share = args[:writers_can_share] if args.key?(:writers_can_share) @writers_can_share = args[:writers_can_share] if args.key?(:writers_can_share)
end end
# Capabilities the current user has on the file. Each capability corresponds to
# a fine-grained action that a user may take.
class Capabilities
include Google::Apis::Core::Hashable
# Whether the current user can add children to this folder. This is always false
# when the item is not a folder.
# Corresponds to the JSON property `canAddChildren`
# @return [Boolean]
attr_accessor :can_add_children
alias_method :can_add_children?, :can_add_children
# Whether the current user can comment on the file.
# Corresponds to the JSON property `canComment`
# @return [Boolean]
attr_accessor :can_comment
alias_method :can_comment?, :can_comment
# Whether the file can be copied by the current user. For a Team Drive item,
# whether non-folder descendants of this item, or this item itself if it is not
# a folder, can be copied.
# Corresponds to the JSON property `canCopy`
# @return [Boolean]
attr_accessor :can_copy
alias_method :can_copy?, :can_copy
# Whether the file can be deleted by the current user.
# Corresponds to the JSON property `canDelete`
# @return [Boolean]
attr_accessor :can_delete
alias_method :can_delete?, :can_delete
# Whether the file can be downloaded by the current user.
# Corresponds to the JSON property `canDownload`
# @return [Boolean]
attr_accessor :can_download
alias_method :can_download?, :can_download
# Whether the file can be edited by the current user.
# Corresponds to the JSON property `canEdit`
# @return [Boolean]
attr_accessor :can_edit
alias_method :can_edit?, :can_edit
# Whether the current user can list the children of this folder. This is always
# false when the item is not a folder.
# Corresponds to the JSON property `canListChildren`
# @return [Boolean]
attr_accessor :can_list_children
alias_method :can_list_children?, :can_list_children
# Whether the current user can move this item into a Team Drive. If the item is
# in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
# Corresponds to the JSON property `canMoveItemIntoTeamDrive`
# @return [Boolean]
attr_accessor :can_move_item_into_team_drive
alias_method :can_move_item_into_team_drive?, :can_move_item_into_team_drive
# Whether the current user can move this Team Drive item by changing its parent.
# Note that a request to change the parent for this item may still fail
# depending on the new parent that is being added. Only populated for Team Drive
# files.
# Corresponds to the JSON property `canMoveTeamDriveItem`
# @return [Boolean]
attr_accessor :can_move_team_drive_item
alias_method :can_move_team_drive_item?, :can_move_team_drive_item
# Whether the current user has read access to the Revisions resource of the file.
# For a Team Drive item, whether revisions of non-folder descendants of this
# item, or this item itself if it is not a folder, can be read.
# Corresponds to the JSON property `canReadRevisions`
# @return [Boolean]
attr_accessor :can_read_revisions
alias_method :can_read_revisions?, :can_read_revisions
# Whether the current user has read access to the Team Drive to which this file
# belongs. Only populated for Team Drive files.
# Corresponds to the JSON property `canReadTeamDrive`
# @return [Boolean]
attr_accessor :can_read_team_drive
alias_method :can_read_team_drive?, :can_read_team_drive
# Whether the current user can remove children from this folder. This is always
# false when the item is not a folder.
# Corresponds to the JSON property `canRemoveChildren`
# @return [Boolean]
attr_accessor :can_remove_children
alias_method :can_remove_children?, :can_remove_children
# Whether the file can be renamed by the current user.
# Corresponds to the JSON property `canRename`
# @return [Boolean]
attr_accessor :can_rename
alias_method :can_rename?, :can_rename
# Whether the file's sharing settings can be modified by the current user.
# Corresponds to the JSON property `canShare`
# @return [Boolean]
attr_accessor :can_share
alias_method :can_share?, :can_share
# Whether the file can be trashed by the current user.
# Corresponds to the JSON property `canTrash`
# @return [Boolean]
attr_accessor :can_trash
alias_method :can_trash?, :can_trash
# Whether the file can be restored from the trash by the current user.
# Corresponds to the JSON property `canUntrash`
# @return [Boolean]
attr_accessor :can_untrash
alias_method :can_untrash?, :can_untrash
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@can_add_children = args[:can_add_children] if args.key?(:can_add_children)
@can_comment = args[:can_comment] if args.key?(:can_comment)
@can_copy = args[:can_copy] if args.key?(:can_copy)
@can_delete = args[:can_delete] if args.key?(:can_delete)
@can_download = args[:can_download] if args.key?(:can_download)
@can_edit = args[:can_edit] if args.key?(:can_edit)
@can_list_children = args[:can_list_children] if args.key?(:can_list_children)
@can_move_item_into_team_drive = args[:can_move_item_into_team_drive] if args.key?(:can_move_item_into_team_drive)
@can_move_team_drive_item = args[:can_move_team_drive_item] if args.key?(:can_move_team_drive_item)
@can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
@can_read_team_drive = args[:can_read_team_drive] if args.key?(:can_read_team_drive)
@can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
@can_rename = args[:can_rename] if args.key?(:can_rename)
@can_share = args[:can_share] if args.key?(:can_share)
@can_trash = args[:can_trash] if args.key?(:can_trash)
@can_untrash = args[:can_untrash] if args.key?(:can_untrash)
end
end
# Metadata about image media. This will only be present for image types, and its # Metadata about image media. This will only be present for image types, and its
# contents will depend on what can be parsed from the image content. # contents will depend on what can be parsed from the image content.
class ImageMediaMetadata class ImageMediaMetadata
@ -1946,6 +2152,17 @@ module Google
# @return [String] # @return [String]
attr_accessor :etag attr_accessor :etag
# Whether the search process was incomplete. If true, then some search results
# may be missing, since all documents were not searched. This may occur when
# searching multiple Team Drives with the "default,allTeamDrives" corpora, but
# all corpora could not be searched. When this happens, it is suggested that
# clients narrow their query by choosing a different corpus such as "default" or
# "teamDrive".
# Corresponds to the JSON property `incompleteSearch`
# @return [Boolean]
attr_accessor :incomplete_search
alias_method :incomplete_search?, :incomplete_search
# The list of files. If nextPageToken is populated, then this list may be # The list of files. If nextPageToken is populated, then this list may be
# incomplete and an additional page of results should be fetched. # incomplete and an additional page of results should be fetched.
# Corresponds to the JSON property `items` # Corresponds to the JSON property `items`
@ -1982,6 +2199,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@etag = args[:etag] if args.key?(:etag) @etag = args[:etag] if args.key?(:etag)
@incomplete_search = args[:incomplete_search] if args.key?(:incomplete_search)
@items = args[:items] if args.key?(:items) @items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind) @kind = args[:kind] if args.key?(:kind)
@next_link = args[:next_link] if args.key?(:next_link) @next_link = args[:next_link] if args.key?(:next_link)
@ -2106,7 +2324,8 @@ module Google
class Permission class Permission
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Additional roles for this user. Only commenter is currently allowed. # Additional roles for this user. Only commenter is currently allowed, though
# more may be supported in the future.
# Corresponds to the JSON property `additionalRoles` # Corresponds to the JSON property `additionalRoles`
# @return [Array<String>] # @return [Array<String>]
attr_accessor :additional_roles attr_accessor :additional_roles
@ -2133,7 +2352,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :etag attr_accessor :etag
# The time at which this permission will expire (RFC 3339 date-time). # The time at which this permission will expire (RFC 3339 date-time). Expiration
# dates have the following restrictions:
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
# - The date can only be set on drive.permissions.update requests
# Corresponds to the JSON property `expirationDate` # Corresponds to the JSON property `expirationDate`
# @return [DateTime] # @return [DateTime]
attr_accessor :expiration_date attr_accessor :expiration_date
@ -2161,7 +2385,9 @@ module Google
# @return [String] # @return [String]
attr_accessor :photo_link attr_accessor :photo_link
# The primary role for this user. Allowed values are: # The primary role for this user. While new values may be supported in the
# future, the following are currently allowed:
# - organizer
# - owner # - owner
# - reader # - reader
# - writer # - writer
@ -2174,6 +2400,13 @@ module Google
# @return [String] # @return [String]
attr_accessor :self_link attr_accessor :self_link
# Details of whether the Permissions on this Team Drive item are inherited or
# directly on this item. This is an output-only field which is present only for
# Team Drive items.
# Corresponds to the JSON property `teamDrivePermissionDetails`
# @return [Array<Google::Apis::DriveV2::Permission::TeamDrivePermissionDetail>]
attr_accessor :team_drive_permission_details
# The account type. Allowed values are: # The account type. Allowed values are:
# - user # - user
# - group # - group
@ -2215,10 +2448,65 @@ module Google
@photo_link = args[:photo_link] if args.key?(:photo_link) @photo_link = args[:photo_link] if args.key?(:photo_link)
@role = args[:role] if args.key?(:role) @role = args[:role] if args.key?(:role)
@self_link = args[:self_link] if args.key?(:self_link) @self_link = args[:self_link] if args.key?(:self_link)
@team_drive_permission_details = args[:team_drive_permission_details] if args.key?(:team_drive_permission_details)
@type = args[:type] if args.key?(:type) @type = args[:type] if args.key?(:type)
@value = args[:value] if args.key?(:value) @value = args[:value] if args.key?(:value)
@with_link = args[:with_link] if args.key?(:with_link) @with_link = args[:with_link] if args.key?(:with_link)
end end
#
class TeamDrivePermissionDetail
include Google::Apis::Core::Hashable
# Additional roles for this user. Only commenter is currently possible, though
# more may be supported in the future.
# Corresponds to the JSON property `additionalRoles`
# @return [Array<String>]
attr_accessor :additional_roles
# Whether this permission is inherited. This field is always populated. This is
# an output-only field.
# Corresponds to the JSON property `inherited`
# @return [Boolean]
attr_accessor :inherited
alias_method :inherited?, :inherited
# The ID of the item from which this permission is inherited. This is an output-
# only field and is only populated for members of the Team Drive.
# Corresponds to the JSON property `inheritedFrom`
# @return [String]
attr_accessor :inherited_from
# The primary role for this user. While new values may be added in the future,
# the following are currently possible:
# - organizer
# - reader
# - writer
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
# The Team Drive permission type for this user. While new values may be added in
# future, the following are currently possible:
# - file
# - member
# Corresponds to the JSON property `teamDrivePermissionType`
# @return [String]
attr_accessor :team_drive_permission_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@additional_roles = args[:additional_roles] if args.key?(:additional_roles)
@inherited = args[:inherited] if args.key?(:inherited)
@inherited_from = args[:inherited_from] if args.key?(:inherited_from)
@role = args[:role] if args.key?(:role)
@team_drive_permission_type = args[:team_drive_permission_type] if args.key?(:team_drive_permission_type)
end
end
end end
# An ID for a user or group as seen in Permission items. # An ID for a user or group as seen in Permission items.
@ -2265,6 +2553,14 @@ module Google
# @return [String] # @return [String]
attr_accessor :kind attr_accessor :kind
# The page token for the next page of permissions. This field will be absent if
# the end of the permissions list has been reached. If the token is rejected for
# any reason, it should be discarded, and pagination should be restarted from
# the first page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# A link back to this list. # A link back to this list.
# Corresponds to the JSON property `selfLink` # Corresponds to the JSON property `selfLink`
# @return [String] # @return [String]
@ -2279,6 +2575,7 @@ module Google
@etag = args[:etag] if args.key?(:etag) @etag = args[:etag] if args.key?(:etag)
@items = args[:items] if args.key?(:items) @items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind) @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) @self_link = args[:self_link] if args.key?(:self_link)
end end
end end
@ -2585,6 +2882,181 @@ module Google
end end
end end
# Representation of a Team Drive.
class TeamDrive
include Google::Apis::Core::Hashable
# Capabilities the current user has on this Team Drive.
# Corresponds to the JSON property `capabilities`
# @return [Google::Apis::DriveV2::TeamDrive::Capabilities]
attr_accessor :capabilities
# The ID of this Team Drive which is also the ID of the top level folder for
# this Team Drive.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# This is always drive#teamDrive
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The name of this Team Drive.
# 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)
@capabilities = args[:capabilities] if args.key?(:capabilities)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
end
# Capabilities the current user has on this Team Drive.
class Capabilities
include Google::Apis::Core::Hashable
# Whether the current user can add children to folders in this Team Drive.
# Corresponds to the JSON property `canAddChildren`
# @return [Boolean]
attr_accessor :can_add_children
alias_method :can_add_children?, :can_add_children
# Whether the current user can comment on files in this Team Drive.
# Corresponds to the JSON property `canComment`
# @return [Boolean]
attr_accessor :can_comment
alias_method :can_comment?, :can_comment
# Whether files in this Team Drive can be copied by the current user.
# Corresponds to the JSON property `canCopy`
# @return [Boolean]
attr_accessor :can_copy
alias_method :can_copy?, :can_copy
# Whether this Team Drive can be deleted by the current user.
# Corresponds to the JSON property `canDeleteTeamDrive`
# @return [Boolean]
attr_accessor :can_delete_team_drive
alias_method :can_delete_team_drive?, :can_delete_team_drive
# Whether files in this Team Drive can be downloaded by the current user.
# Corresponds to the JSON property `canDownload`
# @return [Boolean]
attr_accessor :can_download
alias_method :can_download?, :can_download
# Whether files in this Team Drive can be edited by the current user.
# Corresponds to the JSON property `canEdit`
# @return [Boolean]
attr_accessor :can_edit
alias_method :can_edit?, :can_edit
# Whether the current user can list the children of folders in this Team Drive.
# Corresponds to the JSON property `canListChildren`
# @return [Boolean]
attr_accessor :can_list_children
alias_method :can_list_children?, :can_list_children
# Whether the current user can add members to this Team Drive or remove them or
# change their role.
# Corresponds to the JSON property `canManageMembers`
# @return [Boolean]
attr_accessor :can_manage_members
alias_method :can_manage_members?, :can_manage_members
# Whether the current user has read access to the Revisions resource of files in
# this Team Drive.
# Corresponds to the JSON property `canReadRevisions`
# @return [Boolean]
attr_accessor :can_read_revisions
alias_method :can_read_revisions?, :can_read_revisions
# Whether the current user can remove children from folders in this Team Drive.
# Corresponds to the JSON property `canRemoveChildren`
# @return [Boolean]
attr_accessor :can_remove_children
alias_method :can_remove_children?, :can_remove_children
# Whether files or folders in this Team Drive can be renamed by the current user.
# Corresponds to the JSON property `canRename`
# @return [Boolean]
attr_accessor :can_rename
alias_method :can_rename?, :can_rename
# Whether this Team Drive can be renamed by the current user.
# Corresponds to the JSON property `canRenameTeamDrive`
# @return [Boolean]
attr_accessor :can_rename_team_drive
alias_method :can_rename_team_drive?, :can_rename_team_drive
# Whether the current user can share files or folders in this Team Drive.
# Corresponds to the JSON property `canShare`
# @return [Boolean]
attr_accessor :can_share
alias_method :can_share?, :can_share
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@can_add_children = args[:can_add_children] if args.key?(:can_add_children)
@can_comment = args[:can_comment] if args.key?(:can_comment)
@can_copy = args[:can_copy] if args.key?(:can_copy)
@can_delete_team_drive = args[:can_delete_team_drive] if args.key?(:can_delete_team_drive)
@can_download = args[:can_download] if args.key?(:can_download)
@can_edit = args[:can_edit] if args.key?(:can_edit)
@can_list_children = args[:can_list_children] if args.key?(:can_list_children)
@can_manage_members = args[:can_manage_members] if args.key?(:can_manage_members)
@can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
@can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
@can_rename = args[:can_rename] if args.key?(:can_rename)
@can_rename_team_drive = args[:can_rename_team_drive] if args.key?(:can_rename_team_drive)
@can_share = args[:can_share] if args.key?(:can_share)
end
end
end
# A list of Team Drives.
class TeamDriveList
include Google::Apis::Core::Hashable
# The list of Team Drives.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::DriveV2::TeamDrive>]
attr_accessor :items
# This is always drive#teamDriveList
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The page token for the next page of Team Drives.
# 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)
@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)
end
end
# Information about a Drive user. # Information about a Drive user.
class User class User
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable

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