Autogenerated update (2017-08-26)
Add: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangeseller_v1 - adexchangeseller_v1_1 - analytics_v2_4 - androidpublisher_v1 - androidpublisher_v1_1 - appengine_v1alpha - appengine_v1beta - appengine_v1beta4 - appengine_v1beta5 - blogger_v2 - cloudfunctions_v1beta2 - cloudresourcemanager_v2beta1 - clouduseraccounts_alpha - clouduseraccounts_vm_beta - compute_alpha - container_v1beta1 - content_v2sandbox - dataproc_v1beta2 - datastore_v1beta3 - deploymentmanager_alpha - deploymentmanager_v2beta - fusiontables_v1 - genomics_v1alpha2 - language_v1beta2 - ml_v1beta1 - oauth2_v1 - pagespeedonline_v1 - prediction_v1_2 - prediction_v1_3 - prediction_v1_4 - prediction_v1_5 - pubsub_v1beta1a - pubsub_v1beta2 - replicapool_v1beta1 - resourceviews_v1beta1 - runtimeconfig_v1beta1 - sqladmin_v1beta3 - storage_v1beta1 - storage_v1beta2 - taskqueue_v1beta1 - toolresults_v1beta3firstparty - youtube_analytics_v1beta1 Update: - admin_directory_v1 - cloudresourcemanager_v1beta1 - cloudtrace_v1 - dfareporting_v2_7 - dns_v2beta1 - drive_v2 - language_v1beta1 - logging_v2beta1 - speech_v1beta1
This commit is contained in:
parent
4759ffb5dd
commit
0b77e757ad
13297
api_names_out.yaml
13297
api_names_out.yaml
File diff suppressed because it is too large
Load Diff
|
@ -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/adexchangebuyer_v1_2/service.rb'
|
||||
require 'google/apis/adexchangebuyer_v1_2/classes.rb'
|
||||
require 'google/apis/adexchangebuyer_v1_2/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Ad Exchange Buyer API
|
||||
#
|
||||
# Accesses your bidding-account information, submits creatives for validation,
|
||||
# finds available direct deals, and retrieves performance reports.
|
||||
#
|
||||
# @see https://developers.google.com/ad-exchange/buyer-rest
|
||||
module AdexchangebuyerV1_2
|
||||
VERSION = 'V1_2'
|
||||
REVISION = '20170215'
|
||||
|
||||
# Manage your Ad Exchange buyer account configuration
|
||||
AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,457 @@
|
|||
# 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 AdexchangebuyerV1_2
|
||||
|
||||
# Configuration data for an Ad Exchange buyer account.
|
||||
class Account
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Your bidder locations that have distinct URLs.
|
||||
# Corresponds to the JSON property `bidderLocation`
|
||||
# @return [Array<Google::Apis::AdexchangebuyerV1_2::Account::BidderLocation>]
|
||||
attr_accessor :bidder_location
|
||||
|
||||
# The nid parameter value used in cookie match requests. Please contact your
|
||||
# technical account manager if you need to change this.
|
||||
# Corresponds to the JSON property `cookieMatchingNid`
|
||||
# @return [String]
|
||||
attr_accessor :cookie_matching_nid
|
||||
|
||||
# The base URL used in cookie match requests.
|
||||
# Corresponds to the JSON property `cookieMatchingUrl`
|
||||
# @return [String]
|
||||
attr_accessor :cookie_matching_url
|
||||
|
||||
# Account id.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# Resource type.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# The maximum number of active creatives that an account can have, where a
|
||||
# creative is active if it was inserted or bid with in the last 30 days. Please
|
||||
# contact your technical account manager if you need to change this.
|
||||
# Corresponds to the JSON property `maximumActiveCreatives`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :maximum_active_creatives
|
||||
|
||||
# The sum of all bidderLocation.maximumQps values cannot exceed this. Please
|
||||
# contact your technical account manager if you need to change this.
|
||||
# Corresponds to the JSON property `maximumTotalQps`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :maximum_total_qps
|
||||
|
||||
# The number of creatives that this account inserted or bid with in the last 30
|
||||
# days.
|
||||
# Corresponds to the JSON property `numberActiveCreatives`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :number_active_creatives
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@bidder_location = args[:bidder_location] if args.key?(:bidder_location)
|
||||
@cookie_matching_nid = args[:cookie_matching_nid] if args.key?(:cookie_matching_nid)
|
||||
@cookie_matching_url = args[:cookie_matching_url] if args.key?(:cookie_matching_url)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@maximum_active_creatives = args[:maximum_active_creatives] if args.key?(:maximum_active_creatives)
|
||||
@maximum_total_qps = args[:maximum_total_qps] if args.key?(:maximum_total_qps)
|
||||
@number_active_creatives = args[:number_active_creatives] if args.key?(:number_active_creatives)
|
||||
end
|
||||
|
||||
#
|
||||
class BidderLocation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The maximum queries per second the Ad Exchange will send.
|
||||
# Corresponds to the JSON property `maximumQps`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :maximum_qps
|
||||
|
||||
# The geographical region the Ad Exchange should send requests from. Only used
|
||||
# by some quota systems, but always setting the value is recommended. Allowed
|
||||
# values:
|
||||
# - ASIA
|
||||
# - EUROPE
|
||||
# - US_EAST
|
||||
# - US_WEST
|
||||
# Corresponds to the JSON property `region`
|
||||
# @return [String]
|
||||
attr_accessor :region
|
||||
|
||||
# The URL to which the Ad Exchange will send bid requests.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@maximum_qps = args[:maximum_qps] if args.key?(:maximum_qps)
|
||||
@region = args[:region] if args.key?(:region)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# An account feed lists Ad Exchange buyer accounts that the user has access to.
|
||||
# Each entry in the feed corresponds to a single buyer account.
|
||||
class AccountsList
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of accounts.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangebuyerV1_2::Account>]
|
||||
attr_accessor :items
|
||||
|
||||
# Resource type.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
# A creative and its classification data.
|
||||
class Creative
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The HTML snippet that displays the ad when inserted in the web page. If set,
|
||||
# videoURL should not be set.
|
||||
# Corresponds to the JSON property `HTMLSnippet`
|
||||
# @return [String]
|
||||
attr_accessor :html_snippet
|
||||
|
||||
# Account id.
|
||||
# Corresponds to the JSON property `accountId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :account_id
|
||||
|
||||
# Detected advertiser id, if any. Read-only. This field should not be set in
|
||||
# requests.
|
||||
# Corresponds to the JSON property `advertiserId`
|
||||
# @return [Array<Fixnum>]
|
||||
attr_accessor :advertiser_id
|
||||
|
||||
# The name of the company being advertised in the creative.
|
||||
# Corresponds to the JSON property `advertiserName`
|
||||
# @return [String]
|
||||
attr_accessor :advertiser_name
|
||||
|
||||
# The agency id for this creative.
|
||||
# Corresponds to the JSON property `agencyId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :agency_id
|
||||
|
||||
# The last upload timestamp of this creative if it was uploaded via API. Read-
|
||||
# only. The value of this field is generated, and will be ignored for uploads. (
|
||||
# formatted RFC 3339 timestamp).
|
||||
# Corresponds to the JSON property `apiUploadTimestamp`
|
||||
# @return [DateTime]
|
||||
attr_accessor :api_upload_timestamp
|
||||
|
||||
# All attributes for the ads that may be shown from this snippet.
|
||||
# Corresponds to the JSON property `attribute`
|
||||
# @return [Array<Fixnum>]
|
||||
attr_accessor :attribute
|
||||
|
||||
# A buyer-specific id identifying the creative in this ad.
|
||||
# Corresponds to the JSON property `buyerCreativeId`
|
||||
# @return [String]
|
||||
attr_accessor :buyer_creative_id
|
||||
|
||||
# The set of destination urls for the snippet.
|
||||
# Corresponds to the JSON property `clickThroughUrl`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :click_through_url
|
||||
|
||||
# Shows any corrections that were applied to this creative. Read-only. This
|
||||
# field should not be set in requests.
|
||||
# Corresponds to the JSON property `corrections`
|
||||
# @return [Array<Google::Apis::AdexchangebuyerV1_2::Creative::Correction>]
|
||||
attr_accessor :corrections
|
||||
|
||||
# The reasons for disapproval, if any. Note that not all disapproval reasons may
|
||||
# be categorized, so it is possible for the creative to have a status of
|
||||
# DISAPPROVED with an empty list for disapproval_reasons. In this case, please
|
||||
# reach out to your TAM to help debug the issue. Read-only. This field should
|
||||
# not be set in requests.
|
||||
# Corresponds to the JSON property `disapprovalReasons`
|
||||
# @return [Array<Google::Apis::AdexchangebuyerV1_2::Creative::DisapprovalReason>]
|
||||
attr_accessor :disapproval_reasons
|
||||
|
||||
# The filtering reasons for the creative. Read-only. This field should not be
|
||||
# set in requests.
|
||||
# Corresponds to the JSON property `filteringReasons`
|
||||
# @return [Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons]
|
||||
attr_accessor :filtering_reasons
|
||||
|
||||
# Ad height.
|
||||
# Corresponds to the JSON property `height`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :height
|
||||
|
||||
# The set of urls to be called to record an impression.
|
||||
# Corresponds to the JSON property `impressionTrackingUrl`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :impression_tracking_url
|
||||
|
||||
# Resource type.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Detected product categories, if any. Read-only. This field should not be set
|
||||
# in requests.
|
||||
# Corresponds to the JSON property `productCategories`
|
||||
# @return [Array<Fixnum>]
|
||||
attr_accessor :product_categories
|
||||
|
||||
# All restricted categories for the ads that may be shown from this snippet.
|
||||
# Corresponds to the JSON property `restrictedCategories`
|
||||
# @return [Array<Fixnum>]
|
||||
attr_accessor :restricted_categories
|
||||
|
||||
# Detected sensitive categories, if any. Read-only. This field should not be set
|
||||
# in requests.
|
||||
# Corresponds to the JSON property `sensitiveCategories`
|
||||
# @return [Array<Fixnum>]
|
||||
attr_accessor :sensitive_categories
|
||||
|
||||
# Creative serving status. Read-only. This field should not be set in requests.
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
# All vendor types for the ads that may be shown from this snippet.
|
||||
# Corresponds to the JSON property `vendorType`
|
||||
# @return [Array<Fixnum>]
|
||||
attr_accessor :vendor_type
|
||||
|
||||
# The version for this creative. Read-only. This field should not be set in
|
||||
# requests.
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :version
|
||||
|
||||
# The url to fetch a video ad. If set, HTMLSnippet should not be set.
|
||||
# Corresponds to the JSON property `videoURL`
|
||||
# @return [String]
|
||||
attr_accessor :video_url
|
||||
|
||||
# Ad width.
|
||||
# Corresponds to the JSON property `width`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :width
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@html_snippet = args[:html_snippet] if args.key?(:html_snippet)
|
||||
@account_id = args[:account_id] if args.key?(:account_id)
|
||||
@advertiser_id = args[:advertiser_id] if args.key?(:advertiser_id)
|
||||
@advertiser_name = args[:advertiser_name] if args.key?(:advertiser_name)
|
||||
@agency_id = args[:agency_id] if args.key?(:agency_id)
|
||||
@api_upload_timestamp = args[:api_upload_timestamp] if args.key?(:api_upload_timestamp)
|
||||
@attribute = args[:attribute] if args.key?(:attribute)
|
||||
@buyer_creative_id = args[:buyer_creative_id] if args.key?(:buyer_creative_id)
|
||||
@click_through_url = args[:click_through_url] if args.key?(:click_through_url)
|
||||
@corrections = args[:corrections] if args.key?(:corrections)
|
||||
@disapproval_reasons = args[:disapproval_reasons] if args.key?(:disapproval_reasons)
|
||||
@filtering_reasons = args[:filtering_reasons] if args.key?(:filtering_reasons)
|
||||
@height = args[:height] if args.key?(:height)
|
||||
@impression_tracking_url = args[:impression_tracking_url] if args.key?(:impression_tracking_url)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@product_categories = args[:product_categories] if args.key?(:product_categories)
|
||||
@restricted_categories = args[:restricted_categories] if args.key?(:restricted_categories)
|
||||
@sensitive_categories = args[:sensitive_categories] if args.key?(:sensitive_categories)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
@vendor_type = args[:vendor_type] if args.key?(:vendor_type)
|
||||
@version = args[:version] if args.key?(:version)
|
||||
@video_url = args[:video_url] if args.key?(:video_url)
|
||||
@width = args[:width] if args.key?(:width)
|
||||
end
|
||||
|
||||
#
|
||||
class Correction
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Additional details about the correction.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :details
|
||||
|
||||
# The type of correction that was applied to the creative.
|
||||
# Corresponds to the JSON property `reason`
|
||||
# @return [String]
|
||||
attr_accessor :reason
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@reason = args[:reason] if args.key?(:reason)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class DisapprovalReason
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Additional details about the reason for disapproval.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :details
|
||||
|
||||
# The categorized reason for disapproval.
|
||||
# Corresponds to the JSON property `reason`
|
||||
# @return [String]
|
||||
attr_accessor :reason
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@reason = args[:reason] if args.key?(:reason)
|
||||
end
|
||||
end
|
||||
|
||||
# The filtering reasons for the creative. Read-only. This field should not be
|
||||
# set in requests.
|
||||
class FilteringReasons
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The date in ISO 8601 format for the data. The data is collected from 00:00:00
|
||||
# to 23:59:59 in PST.
|
||||
# Corresponds to the JSON property `date`
|
||||
# @return [String]
|
||||
attr_accessor :date
|
||||
|
||||
# The filtering reasons.
|
||||
# Corresponds to the JSON property `reasons`
|
||||
# @return [Array<Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons::Reason>]
|
||||
attr_accessor :reasons
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@date = args[:date] if args.key?(:date)
|
||||
@reasons = args[:reasons] if args.key?(:reasons)
|
||||
end
|
||||
|
||||
#
|
||||
class Reason
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The number of times the creative was filtered for the status. The count is
|
||||
# aggregated across all publishers on the exchange.
|
||||
# Corresponds to the JSON property `filteringCount`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :filtering_count
|
||||
|
||||
# The filtering status code. Please refer to the creative-status-codes.txt file
|
||||
# for different statuses.
|
||||
# Corresponds to the JSON property `filteringStatus`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :filtering_status
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@filtering_count = args[:filtering_count] if args.key?(:filtering_count)
|
||||
@filtering_status = args[:filtering_status] if args.key?(:filtering_status)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# The creatives feed lists the active creatives for the Ad Exchange buyer
|
||||
# accounts that the user has access to. Each entry in the feed corresponds to a
|
||||
# single creative.
|
||||
class CreativesList
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of creatives.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangebuyerV1_2::Creative>]
|
||||
attr_accessor :items
|
||||
|
||||
# Resource type.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through creatives. To retrieve the next page
|
||||
# of results, set the next request's "pageToken" value to this.
|
||||
# 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
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,189 @@
|
|||
# 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 AdexchangebuyerV1_2
|
||||
|
||||
class Account
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class BidderLocation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccountsList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Creative
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Correction
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DisapprovalReason
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FilteringReasons
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Reason
|
||||
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 CreativesList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Account
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :bidder_location, as: 'bidderLocation', class: Google::Apis::AdexchangebuyerV1_2::Account::BidderLocation, decorator: Google::Apis::AdexchangebuyerV1_2::Account::BidderLocation::Representation
|
||||
|
||||
property :cookie_matching_nid, as: 'cookieMatchingNid'
|
||||
property :cookie_matching_url, as: 'cookieMatchingUrl'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :maximum_active_creatives, as: 'maximumActiveCreatives'
|
||||
property :maximum_total_qps, as: 'maximumTotalQps'
|
||||
property :number_active_creatives, as: 'numberActiveCreatives'
|
||||
end
|
||||
|
||||
class BidderLocation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :maximum_qps, as: 'maximumQps'
|
||||
property :region, as: 'region'
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class AccountsList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_2::Account, decorator: Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class Creative
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :html_snippet, as: 'HTMLSnippet'
|
||||
property :account_id, as: 'accountId'
|
||||
collection :advertiser_id, as: 'advertiserId'
|
||||
property :advertiser_name, as: 'advertiserName'
|
||||
property :agency_id, :numeric_string => true, as: 'agencyId'
|
||||
property :api_upload_timestamp, as: 'apiUploadTimestamp', type: DateTime
|
||||
|
||||
collection :attribute, as: 'attribute'
|
||||
property :buyer_creative_id, as: 'buyerCreativeId'
|
||||
collection :click_through_url, as: 'clickThroughUrl'
|
||||
collection :corrections, as: 'corrections', class: Google::Apis::AdexchangebuyerV1_2::Creative::Correction, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::Correction::Representation
|
||||
|
||||
collection :disapproval_reasons, as: 'disapprovalReasons', class: Google::Apis::AdexchangebuyerV1_2::Creative::DisapprovalReason, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::DisapprovalReason::Representation
|
||||
|
||||
property :filtering_reasons, as: 'filteringReasons', class: Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons::Representation
|
||||
|
||||
property :height, as: 'height'
|
||||
collection :impression_tracking_url, as: 'impressionTrackingUrl'
|
||||
property :kind, as: 'kind'
|
||||
collection :product_categories, as: 'productCategories'
|
||||
collection :restricted_categories, as: 'restrictedCategories'
|
||||
collection :sensitive_categories, as: 'sensitiveCategories'
|
||||
property :status, as: 'status'
|
||||
collection :vendor_type, as: 'vendorType'
|
||||
property :version, as: 'version'
|
||||
property :video_url, as: 'videoURL'
|
||||
property :width, as: 'width'
|
||||
end
|
||||
|
||||
class Correction
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :details, as: 'details'
|
||||
property :reason, as: 'reason'
|
||||
end
|
||||
end
|
||||
|
||||
class DisapprovalReason
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :details, as: 'details'
|
||||
property :reason, as: 'reason'
|
||||
end
|
||||
end
|
||||
|
||||
class FilteringReasons
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :date, as: 'date'
|
||||
collection :reasons, as: 'reasons', class: Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons::Reason, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons::Reason::Representation
|
||||
|
||||
end
|
||||
|
||||
class Reason
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :filtering_count, :numeric_string => true, as: 'filteringCount'
|
||||
property :filtering_status, as: 'filteringStatus'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class CreativesList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_2::Creative, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,329 @@
|
|||
# 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 AdexchangebuyerV1_2
|
||||
# Ad Exchange Buyer API
|
||||
#
|
||||
# Accesses your bidding-account information, submits creatives for validation,
|
||||
# finds available direct deals, and retrieves performance reports.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/adexchangebuyer_v1_2'
|
||||
#
|
||||
# Adexchangebuyer = Google::Apis::AdexchangebuyerV1_2 # Alias the module
|
||||
# service = Adexchangebuyer::AdExchangeBuyerService.new
|
||||
#
|
||||
# @see https://developers.google.com/ad-exchange/buyer-rest
|
||||
class AdExchangeBuyerService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'adexchangebuyer/v1.2/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Gets one account by ID.
|
||||
# @param [Fixnum] id
|
||||
# The account 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.
|
||||
# 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::AdexchangebuyerV1_2::Account] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_2::Account]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'accounts/{id}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
|
||||
command.params['id'] = id unless id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves the authenticated user's list of accounts.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangebuyerV1_2::AccountsList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_2::AccountsList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_accounts(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'accounts', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_2::AccountsList::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_2::AccountsList
|
||||
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 an existing account. This method supports patch semantics.
|
||||
# @param [Fixnum] id
|
||||
# The account id
|
||||
# @param [Google::Apis::AdexchangebuyerV1_2::Account] account_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::AdexchangebuyerV1_2::Account] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_2::Account]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'accounts/{id}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
||||
command.request_object = account_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
|
||||
command.params['id'] = id unless id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates an existing account.
|
||||
# @param [Fixnum] id
|
||||
# The account id
|
||||
# @param [Google::Apis::AdexchangebuyerV1_2::Account] account_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::AdexchangebuyerV1_2::Account] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_2::Account]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'accounts/{id}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
||||
command.request_object = account_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
|
||||
command.params['id'] = id unless id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the status for a single creative. A creative will be available 30-40
|
||||
# minutes after submission.
|
||||
# @param [Fixnum] account_id
|
||||
# The id for the account that will serve this creative.
|
||||
# @param [String] buyer_creative_id
|
||||
# The buyer-specific id for this creative.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangebuyerV1_2::Creative] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_2::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_creative(account_id, buyer_creative_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'creatives/{accountId}/{buyerCreativeId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_2::Creative
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['buyerCreativeId'] = buyer_creative_id unless buyer_creative_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Submit a new creative.
|
||||
# @param [Google::Apis::AdexchangebuyerV1_2::Creative] creative_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::AdexchangebuyerV1_2::Creative] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_2::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 insert_creative(creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'creatives', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
|
||||
command.request_object = creative_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_2::Creative
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves a list of the authenticated user's active creatives. A creative will
|
||||
# be available 30-40 minutes after submission.
|
||||
# @param [Fixnum] max_results
|
||||
# Maximum number of entries returned on one result page. If not set, the default
|
||||
# is 100. Optional.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through ad clients. To retrieve the next
|
||||
# page, set this parameter to the value of "nextPageToken" from the previous
|
||||
# response. Optional.
|
||||
# @param [String] status_filter
|
||||
# When specified, only creatives having the given status are returned.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangebuyerV1_2::CreativesList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_2::CreativesList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creatives(max_results: nil, page_token: nil, status_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'creatives', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_2::CreativesList::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_2::CreativesList
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['statusFilter'] = status_filter unless status_filter.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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -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/adexchangebuyer_v1_3/service.rb'
|
||||
require 'google/apis/adexchangebuyer_v1_3/classes.rb'
|
||||
require 'google/apis/adexchangebuyer_v1_3/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Ad Exchange Buyer API
|
||||
#
|
||||
# Accesses your bidding-account information, submits creatives for validation,
|
||||
# finds available direct deals, and retrieves performance reports.
|
||||
#
|
||||
# @see https://developers.google.com/ad-exchange/buyer-rest
|
||||
module AdexchangebuyerV1_3
|
||||
VERSION = 'V1_3'
|
||||
REVISION = '20170215'
|
||||
|
||||
# Manage your Ad Exchange buyer account configuration
|
||||
AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,498 @@
|
|||
# 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 AdexchangebuyerV1_3
|
||||
|
||||
class Account
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class BidderLocation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccountsList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BillingInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BillingInfoList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Budget
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Creative
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Correction
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DisapprovalReason
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FilteringReasons
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Reason
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NativeAd
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class AppIcon
|
||||
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 Logo
|
||||
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 CreativesList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DirectDeal
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DirectDealsList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PerformanceReport
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PerformanceReportList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PretargetingConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Dimension
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ExcludedPlacement
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Placement
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PretargetingConfigList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Account
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :bidder_location, as: 'bidderLocation', class: Google::Apis::AdexchangebuyerV1_3::Account::BidderLocation, decorator: Google::Apis::AdexchangebuyerV1_3::Account::BidderLocation::Representation
|
||||
|
||||
property :cookie_matching_nid, as: 'cookieMatchingNid'
|
||||
property :cookie_matching_url, as: 'cookieMatchingUrl'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :maximum_active_creatives, as: 'maximumActiveCreatives'
|
||||
property :maximum_total_qps, as: 'maximumTotalQps'
|
||||
property :number_active_creatives, as: 'numberActiveCreatives'
|
||||
end
|
||||
|
||||
class BidderLocation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :maximum_qps, as: 'maximumQps'
|
||||
property :region, as: 'region'
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class AccountsList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_3::Account, decorator: Google::Apis::AdexchangebuyerV1_3::Account::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class BillingInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :account_id, as: 'accountId'
|
||||
property :account_name, as: 'accountName'
|
||||
collection :billing_id, as: 'billingId'
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class BillingInfoList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_3::BillingInfo, decorator: Google::Apis::AdexchangebuyerV1_3::BillingInfo::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class Budget
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :account_id, :numeric_string => true, as: 'accountId'
|
||||
property :billing_id, :numeric_string => true, as: 'billingId'
|
||||
property :budget_amount, :numeric_string => true, as: 'budgetAmount'
|
||||
property :currency_code, as: 'currencyCode'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class Creative
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :html_snippet, as: 'HTMLSnippet'
|
||||
property :account_id, as: 'accountId'
|
||||
collection :advertiser_id, as: 'advertiserId'
|
||||
property :advertiser_name, as: 'advertiserName'
|
||||
property :agency_id, :numeric_string => true, as: 'agencyId'
|
||||
property :api_upload_timestamp, as: 'apiUploadTimestamp', type: DateTime
|
||||
|
||||
collection :attribute, as: 'attribute'
|
||||
property :buyer_creative_id, as: 'buyerCreativeId'
|
||||
collection :click_through_url, as: 'clickThroughUrl'
|
||||
collection :corrections, as: 'corrections', class: Google::Apis::AdexchangebuyerV1_3::Creative::Correction, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::Correction::Representation
|
||||
|
||||
collection :disapproval_reasons, as: 'disapprovalReasons', class: Google::Apis::AdexchangebuyerV1_3::Creative::DisapprovalReason, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::DisapprovalReason::Representation
|
||||
|
||||
property :filtering_reasons, as: 'filteringReasons', class: Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons::Representation
|
||||
|
||||
property :height, as: 'height'
|
||||
collection :impression_tracking_url, as: 'impressionTrackingUrl'
|
||||
property :kind, as: 'kind'
|
||||
property :native_ad, as: 'nativeAd', class: Google::Apis::AdexchangebuyerV1_3::Creative::NativeAd, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::NativeAd::Representation
|
||||
|
||||
collection :product_categories, as: 'productCategories'
|
||||
collection :restricted_categories, as: 'restrictedCategories'
|
||||
collection :sensitive_categories, as: 'sensitiveCategories'
|
||||
property :status, as: 'status'
|
||||
collection :vendor_type, as: 'vendorType'
|
||||
property :version, as: 'version'
|
||||
property :video_url, as: 'videoURL'
|
||||
property :width, as: 'width'
|
||||
end
|
||||
|
||||
class Correction
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :details, as: 'details'
|
||||
property :reason, as: 'reason'
|
||||
end
|
||||
end
|
||||
|
||||
class DisapprovalReason
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :details, as: 'details'
|
||||
property :reason, as: 'reason'
|
||||
end
|
||||
end
|
||||
|
||||
class FilteringReasons
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :date, as: 'date'
|
||||
collection :reasons, as: 'reasons', class: Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons::Reason, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons::Reason::Representation
|
||||
|
||||
end
|
||||
|
||||
class Reason
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :filtering_count, :numeric_string => true, as: 'filteringCount'
|
||||
property :filtering_status, as: 'filteringStatus'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class NativeAd
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :advertiser, as: 'advertiser'
|
||||
property :app_icon, as: 'appIcon', class: Google::Apis::AdexchangebuyerV1_3::Creative::NativeAd::AppIcon, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::NativeAd::AppIcon::Representation
|
||||
|
||||
property :body, as: 'body'
|
||||
property :call_to_action, as: 'callToAction'
|
||||
property :click_tracking_url, as: 'clickTrackingUrl'
|
||||
property :headline, as: 'headline'
|
||||
property :image, as: 'image', class: Google::Apis::AdexchangebuyerV1_3::Creative::NativeAd::Image, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::NativeAd::Image::Representation
|
||||
|
||||
collection :impression_tracking_url, as: 'impressionTrackingUrl'
|
||||
property :logo, as: 'logo', class: Google::Apis::AdexchangebuyerV1_3::Creative::NativeAd::Logo, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::NativeAd::Logo::Representation
|
||||
|
||||
property :price, as: 'price'
|
||||
property :star_rating, as: 'starRating'
|
||||
property :store, as: 'store'
|
||||
end
|
||||
|
||||
class AppIcon
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :height, as: 'height'
|
||||
property :url, as: 'url'
|
||||
property :width, as: 'width'
|
||||
end
|
||||
end
|
||||
|
||||
class Image
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :height, as: 'height'
|
||||
property :url, as: 'url'
|
||||
property :width, as: 'width'
|
||||
end
|
||||
end
|
||||
|
||||
class Logo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :height, as: 'height'
|
||||
property :url, as: 'url'
|
||||
property :width, as: 'width'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class CreativesList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_3::Creative, decorator: Google::Apis::AdexchangebuyerV1_3::Creative::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class DirectDeal
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :account_id, as: 'accountId'
|
||||
property :advertiser, as: 'advertiser'
|
||||
property :allows_alcohol, as: 'allowsAlcohol'
|
||||
property :buyer_account_id, :numeric_string => true, as: 'buyerAccountId'
|
||||
property :currency_code, as: 'currencyCode'
|
||||
property :deal_tier, as: 'dealTier'
|
||||
property :end_time, :numeric_string => true, as: 'endTime'
|
||||
property :fixed_cpm, :numeric_string => true, as: 'fixedCpm'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :private_exchange_min_cpm, :numeric_string => true, as: 'privateExchangeMinCpm'
|
||||
property :publisher_blocks_overriden, as: 'publisherBlocksOverriden'
|
||||
property :seller_network, as: 'sellerNetwork'
|
||||
property :start_time, :numeric_string => true, as: 'startTime'
|
||||
end
|
||||
end
|
||||
|
||||
class DirectDealsList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :direct_deals, as: 'directDeals', class: Google::Apis::AdexchangebuyerV1_3::DirectDeal, decorator: Google::Apis::AdexchangebuyerV1_3::DirectDeal::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class PerformanceReport
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :bid_rate, as: 'bidRate'
|
||||
property :bid_request_rate, as: 'bidRequestRate'
|
||||
collection :callout_status_rate, as: 'calloutStatusRate'
|
||||
collection :cookie_matcher_status_rate, as: 'cookieMatcherStatusRate'
|
||||
collection :creative_status_rate, as: 'creativeStatusRate'
|
||||
property :filtered_bid_rate, as: 'filteredBidRate'
|
||||
collection :hosted_match_status_rate, as: 'hostedMatchStatusRate'
|
||||
property :inventory_match_rate, as: 'inventoryMatchRate'
|
||||
property :kind, as: 'kind'
|
||||
property :latency_50th_percentile, as: 'latency50thPercentile'
|
||||
property :latency_85th_percentile, as: 'latency85thPercentile'
|
||||
property :latency_95th_percentile, as: 'latency95thPercentile'
|
||||
property :no_quota_in_region, as: 'noQuotaInRegion'
|
||||
property :out_of_quota, as: 'outOfQuota'
|
||||
property :pixel_match_requests, as: 'pixelMatchRequests'
|
||||
property :pixel_match_responses, as: 'pixelMatchResponses'
|
||||
property :quota_configured_limit, as: 'quotaConfiguredLimit'
|
||||
property :quota_throttled_limit, as: 'quotaThrottledLimit'
|
||||
property :region, as: 'region'
|
||||
property :successful_request_rate, as: 'successfulRequestRate'
|
||||
property :timestamp, :numeric_string => true, as: 'timestamp'
|
||||
property :unsuccessful_request_rate, as: 'unsuccessfulRequestRate'
|
||||
end
|
||||
end
|
||||
|
||||
class PerformanceReportList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :kind, as: 'kind'
|
||||
collection :performance_report, as: 'performanceReport', class: Google::Apis::AdexchangebuyerV1_3::PerformanceReport, decorator: Google::Apis::AdexchangebuyerV1_3::PerformanceReport::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class PretargetingConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :billing_id, :numeric_string => true, as: 'billingId'
|
||||
property :config_id, :numeric_string => true, as: 'configId'
|
||||
property :config_name, as: 'configName'
|
||||
collection :creative_type, as: 'creativeType'
|
||||
collection :dimensions, as: 'dimensions', class: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Dimension, decorator: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Dimension::Representation
|
||||
|
||||
collection :excluded_content_labels, as: 'excludedContentLabels'
|
||||
collection :excluded_geo_criteria_ids, as: 'excludedGeoCriteriaIds'
|
||||
collection :excluded_placements, as: 'excludedPlacements', class: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::ExcludedPlacement, decorator: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::ExcludedPlacement::Representation
|
||||
|
||||
collection :excluded_user_lists, as: 'excludedUserLists'
|
||||
collection :excluded_verticals, as: 'excludedVerticals'
|
||||
collection :geo_criteria_ids, as: 'geoCriteriaIds'
|
||||
property :is_active, as: 'isActive'
|
||||
property :kind, as: 'kind'
|
||||
collection :languages, as: 'languages'
|
||||
collection :mobile_carriers, as: 'mobileCarriers'
|
||||
collection :mobile_devices, as: 'mobileDevices'
|
||||
collection :mobile_operating_system_versions, as: 'mobileOperatingSystemVersions'
|
||||
collection :placements, as: 'placements', class: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Placement, decorator: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Placement::Representation
|
||||
|
||||
collection :platforms, as: 'platforms'
|
||||
collection :supported_creative_attributes, as: 'supportedCreativeAttributes'
|
||||
collection :user_lists, as: 'userLists'
|
||||
collection :vendor_types, as: 'vendorTypes'
|
||||
collection :verticals, as: 'verticals'
|
||||
end
|
||||
|
||||
class Dimension
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :height, :numeric_string => true, as: 'height'
|
||||
property :width, :numeric_string => true, as: 'width'
|
||||
end
|
||||
end
|
||||
|
||||
class ExcludedPlacement
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :token, as: 'token'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
end
|
||||
|
||||
class Placement
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :token, as: 'token'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class PretargetingConfigList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig, decorator: Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,873 @@
|
|||
# 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 AdexchangebuyerV1_3
|
||||
# Ad Exchange Buyer API
|
||||
#
|
||||
# Accesses your bidding-account information, submits creatives for validation,
|
||||
# finds available direct deals, and retrieves performance reports.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/adexchangebuyer_v1_3'
|
||||
#
|
||||
# Adexchangebuyer = Google::Apis::AdexchangebuyerV1_3 # Alias the module
|
||||
# service = Adexchangebuyer::AdExchangeBuyerService.new
|
||||
#
|
||||
# @see https://developers.google.com/ad-exchange/buyer-rest
|
||||
class AdExchangeBuyerService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'adexchangebuyer/v1.3/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Gets one account by ID.
|
||||
# @param [Fixnum] id
|
||||
# The account 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.
|
||||
# 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::AdexchangebuyerV1_3::Account] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::Account]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'accounts/{id}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::Account
|
||||
command.params['id'] = id unless id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves the authenticated user's list of accounts.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangebuyerV1_3::AccountsList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::AccountsList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_accounts(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'accounts', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::AccountsList::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::AccountsList
|
||||
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 an existing account. This method supports patch semantics.
|
||||
# @param [Fixnum] id
|
||||
# The account id
|
||||
# @param [Google::Apis::AdexchangebuyerV1_3::Account] account_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::AdexchangebuyerV1_3::Account] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::Account]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'accounts/{id}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
|
||||
command.request_object = account_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::Account
|
||||
command.params['id'] = id unless id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates an existing account.
|
||||
# @param [Fixnum] id
|
||||
# The account id
|
||||
# @param [Google::Apis::AdexchangebuyerV1_3::Account] account_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::AdexchangebuyerV1_3::Account] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::Account]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'accounts/{id}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
|
||||
command.request_object = account_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Account::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::Account
|
||||
command.params['id'] = id unless id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns the billing information for one account specified by account ID.
|
||||
# @param [Fixnum] account_id
|
||||
# The account 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.
|
||||
# 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::AdexchangebuyerV1_3::BillingInfo] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::BillingInfo]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_billing_info(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'billinginfo/{accountId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::BillingInfo::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::BillingInfo
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves a list of billing information for all accounts of the authenticated
|
||||
# user.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangebuyerV1_3::BillingInfoList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::BillingInfoList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_billing_infos(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'billinginfo', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::BillingInfoList::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::BillingInfoList
|
||||
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 budget information for the adgroup specified by the accountId and
|
||||
# billingId.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id to get the budget information for.
|
||||
# @param [Fixnum] billing_id
|
||||
# The billing id to get the budget information for.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangebuyerV1_3::Budget] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::Budget]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_budget(account_id, billing_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'billinginfo/{accountId}/{billingId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::Budget
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['billingId'] = billing_id unless billing_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the budget amount for the budget of the adgroup specified by the
|
||||
# accountId and billingId, with the budget amount in the request. This method
|
||||
# supports patch semantics.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id associated with the budget being updated.
|
||||
# @param [Fixnum] billing_id
|
||||
# The billing id associated with the budget being updated.
|
||||
# @param [Google::Apis::AdexchangebuyerV1_3::Budget] budget_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::AdexchangebuyerV1_3::Budget] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::Budget]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_budget(account_id, billing_id, budget_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'billinginfo/{accountId}/{billingId}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
|
||||
command.request_object = budget_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::Budget
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['billingId'] = billing_id unless billing_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the budget amount for the budget of the adgroup specified by the
|
||||
# accountId and billingId, with the budget amount in the request.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id associated with the budget being updated.
|
||||
# @param [Fixnum] billing_id
|
||||
# The billing id associated with the budget being updated.
|
||||
# @param [Google::Apis::AdexchangebuyerV1_3::Budget] budget_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::AdexchangebuyerV1_3::Budget] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::Budget]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_budget(account_id, billing_id, budget_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'billinginfo/{accountId}/{billingId}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
|
||||
command.request_object = budget_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Budget::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::Budget
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['billingId'] = billing_id unless billing_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the status for a single creative. A creative will be available 30-40
|
||||
# minutes after submission.
|
||||
# @param [Fixnum] account_id
|
||||
# The id for the account that will serve this creative.
|
||||
# @param [String] buyer_creative_id
|
||||
# The buyer-specific id for this creative.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangebuyerV1_3::Creative] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::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_creative(account_id, buyer_creative_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'creatives/{accountId}/{buyerCreativeId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Creative::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::Creative
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['buyerCreativeId'] = buyer_creative_id unless buyer_creative_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Submit a new creative.
|
||||
# @param [Google::Apis::AdexchangebuyerV1_3::Creative] creative_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::AdexchangebuyerV1_3::Creative] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::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 insert_creative(creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'creatives', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_3::Creative::Representation
|
||||
command.request_object = creative_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::Creative::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::Creative
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves a list of the authenticated user's active creatives. A creative will
|
||||
# be available 30-40 minutes after submission.
|
||||
# @param [Array<Fixnum>, Fixnum] account_id
|
||||
# When specified, only creatives for the given account ids are returned.
|
||||
# @param [Array<String>, String] buyer_creative_id
|
||||
# When specified, only creatives for the given buyer creative ids are returned.
|
||||
# @param [Fixnum] max_results
|
||||
# Maximum number of entries returned on one result page. If not set, the default
|
||||
# is 100. Optional.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through ad clients. To retrieve the next
|
||||
# page, set this parameter to the value of "nextPageToken" from the previous
|
||||
# response. Optional.
|
||||
# @param [String] status_filter
|
||||
# When specified, only creatives having the given status are returned.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangebuyerV1_3::CreativesList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::CreativesList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creatives(account_id: nil, buyer_creative_id: nil, max_results: nil, page_token: nil, status_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'creatives', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::CreativesList::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::CreativesList
|
||||
command.query['accountId'] = account_id unless account_id.nil?
|
||||
command.query['buyerCreativeId'] = buyer_creative_id unless buyer_creative_id.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['statusFilter'] = status_filter unless status_filter.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
|
||||
|
||||
# Gets one direct deal by ID.
|
||||
# @param [Fixnum] id
|
||||
# The direct deal 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.
|
||||
# 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::AdexchangebuyerV1_3::DirectDeal] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::DirectDeal]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_direct_deal(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'directdeals/{id}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::DirectDeal::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::DirectDeal
|
||||
command.params['id'] = id unless id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves the authenticated user's list of direct deals.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangebuyerV1_3::DirectDealsList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::DirectDealsList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_direct_deals(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'directdeals', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::DirectDealsList::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::DirectDealsList
|
||||
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 authenticated user's list of performance metrics.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id to get the reports.
|
||||
# @param [String] end_date_time
|
||||
# The end time of the report in ISO 8601 timestamp format using UTC.
|
||||
# @param [String] start_date_time
|
||||
# The start time of the report in ISO 8601 timestamp format using UTC.
|
||||
# @param [Fixnum] max_results
|
||||
# Maximum number of entries returned on one result page. If not set, the default
|
||||
# is 100. Optional.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through performance reports. To retrieve
|
||||
# the next page, set this parameter to the value of "nextPageToken" from the
|
||||
# previous response. Optional.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangebuyerV1_3::PerformanceReportList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::PerformanceReportList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_performance_reports(account_id, end_date_time, start_date_time, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'performancereport', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PerformanceReportList::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::PerformanceReportList
|
||||
command.query['accountId'] = account_id unless account_id.nil?
|
||||
command.query['endDateTime'] = end_date_time unless end_date_time.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['startDateTime'] = start_date_time unless start_date_time.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
|
||||
|
||||
# Deletes an existing pretargeting config.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id to delete the pretargeting config for.
|
||||
# @param [Fixnum] config_id
|
||||
# The specific id of the configuration 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_pretargeting_config(account_id, config_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'pretargetingconfigs/{accountId}/{configId}', options)
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['configId'] = config_id unless config_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets a specific pretargeting configuration
|
||||
# @param [Fixnum] account_id
|
||||
# The account id to get the pretargeting config for.
|
||||
# @param [Fixnum] config_id
|
||||
# The specific id of the configuration to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangebuyerV1_3::PretargetingConfig] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_pretargeting_config(account_id, config_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'pretargetingconfigs/{accountId}/{configId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['configId'] = config_id unless config_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Inserts a new pretargeting configuration.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id to insert the pretargeting config for.
|
||||
# @param [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] pretargeting_config_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangebuyerV1_3::PretargetingConfig] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_pretargeting_config(account_id, pretargeting_config_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'pretargetingconfigs/{accountId}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
|
||||
command.request_object = pretargeting_config_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves a list of the authenticated user's pretargeting configurations.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id to get the pretargeting configs for.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangebuyerV1_3::PretargetingConfigList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfigList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_pretargeting_configs(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'pretargetingconfigs/{accountId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfigList::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfigList
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates an existing pretargeting config. This method supports patch semantics.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id to update the pretargeting config for.
|
||||
# @param [Fixnum] config_id
|
||||
# The specific id of the configuration to update.
|
||||
# @param [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] pretargeting_config_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangebuyerV1_3::PretargetingConfig] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_pretargeting_config(account_id, config_id, pretargeting_config_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'pretargetingconfigs/{accountId}/{configId}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
|
||||
command.request_object = pretargeting_config_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['configId'] = config_id unless config_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates an existing pretargeting config.
|
||||
# @param [Fixnum] account_id
|
||||
# The account id to update the pretargeting config for.
|
||||
# @param [Fixnum] config_id
|
||||
# The specific id of the configuration to update.
|
||||
# @param [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig] pretargeting_config_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangebuyerV1_3::PretargetingConfig] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangebuyerV1_3::PretargetingConfig]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_pretargeting_config(account_id, config_id, pretargeting_config_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'pretargetingconfigs/{accountId}/{configId}', options)
|
||||
command.request_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
|
||||
command.request_object = pretargeting_config_object
|
||||
command.response_representation = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Representation
|
||||
command.response_class = Google::Apis::AdexchangebuyerV1_3::PretargetingConfig
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['configId'] = config_id unless config_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,37 @@
|
|||
# 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/adexchangeseller_v1/service.rb'
|
||||
require 'google/apis/adexchangeseller_v1/classes.rb'
|
||||
require 'google/apis/adexchangeseller_v1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Ad Exchange Seller API
|
||||
#
|
||||
# Accesses the inventory of Ad Exchange seller users and generates reports.
|
||||
#
|
||||
# @see https://developers.google.com/ad-exchange/seller-rest/
|
||||
module AdexchangesellerV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20160805'
|
||||
|
||||
# View and manage your Ad Exchange data
|
||||
AUTH_ADEXCHANGE_SELLER = 'https://www.googleapis.com/auth/adexchange.seller'
|
||||
|
||||
# View your Ad Exchange data
|
||||
AUTH_ADEXCHANGE_SELLER_READONLY = 'https://www.googleapis.com/auth/adexchange.seller.readonly'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,557 @@
|
|||
# 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 AdexchangesellerV1
|
||||
|
||||
#
|
||||
class AdClient
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Whether this ad client is opted in to ARC.
|
||||
# Corresponds to the JSON property `arcOptIn`
|
||||
# @return [Boolean]
|
||||
attr_accessor :arc_opt_in
|
||||
alias_method :arc_opt_in?, :arc_opt_in
|
||||
|
||||
# Unique identifier of this ad client.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#adClient.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# This ad client's product code, which corresponds to the PRODUCT_CODE report
|
||||
# dimension.
|
||||
# Corresponds to the JSON property `productCode`
|
||||
# @return [String]
|
||||
attr_accessor :product_code
|
||||
|
||||
# Whether this ad client supports being reported on.
|
||||
# Corresponds to the JSON property `supportsReporting`
|
||||
# @return [Boolean]
|
||||
attr_accessor :supports_reporting
|
||||
alias_method :supports_reporting?, :supports_reporting
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@arc_opt_in = args[:arc_opt_in] if args.key?(:arc_opt_in)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@product_code = args[:product_code] if args.key?(:product_code)
|
||||
@supports_reporting = args[:supports_reporting] if args.key?(:supports_reporting)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class AdClients
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The ad clients returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1::AdClient>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#adClients.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through ad clients. To retrieve the next page
|
||||
# of results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
|
||||
#
|
||||
class AdUnit
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Identity code of this ad unit, not necessarily unique across ad clients.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [String]
|
||||
attr_accessor :code
|
||||
|
||||
# Unique identifier of this ad unit. This should be considered an opaque
|
||||
# identifier; it is not safe to rely on it being in any particular format.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#adUnit.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Name of this ad unit.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# Status of this ad unit. Possible values are:
|
||||
# NEW: Indicates that the ad unit was created within the last seven days and
|
||||
# does not yet have any activity associated with it.
|
||||
# ACTIVE: Indicates that there has been activity on this ad unit in the last
|
||||
# seven days.
|
||||
# INACTIVE: Indicates that there has been no activity on this ad unit in the
|
||||
# last seven days.
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class AdUnits
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The ad units returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1::AdUnit>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#adUnits.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through ad units. To retrieve the next page of
|
||||
# results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
|
||||
#
|
||||
class CustomChannel
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Code of this custom channel, not necessarily unique across ad clients.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [String]
|
||||
attr_accessor :code
|
||||
|
||||
# Unique identifier of this custom channel. This should be considered an opaque
|
||||
# identifier; it is not safe to rely on it being in any particular format.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#customChannel.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Name of this custom channel.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The targeting information of this custom channel, if activated.
|
||||
# Corresponds to the JSON property `targetingInfo`
|
||||
# @return [Google::Apis::AdexchangesellerV1::CustomChannel::TargetingInfo]
|
||||
attr_accessor :targeting_info
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@targeting_info = args[:targeting_info] if args.key?(:targeting_info)
|
||||
end
|
||||
|
||||
# The targeting information of this custom channel, if activated.
|
||||
class TargetingInfo
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The name used to describe this channel externally.
|
||||
# Corresponds to the JSON property `adsAppearOn`
|
||||
# @return [String]
|
||||
attr_accessor :ads_appear_on
|
||||
|
||||
# The external description of the channel.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# The locations in which ads appear. (Only valid for content and mobile content
|
||||
# ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT,
|
||||
# MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER,
|
||||
# BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are:
|
||||
# TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS.
|
||||
# Corresponds to the JSON property `location`
|
||||
# @return [String]
|
||||
attr_accessor :location
|
||||
|
||||
# The language of the sites ads will be displayed on.
|
||||
# Corresponds to the JSON property `siteLanguage`
|
||||
# @return [String]
|
||||
attr_accessor :site_language
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@ads_appear_on = args[:ads_appear_on] if args.key?(:ads_appear_on)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@location = args[:location] if args.key?(:location)
|
||||
@site_language = args[:site_language] if args.key?(:site_language)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class CustomChannels
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The custom channels returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1::CustomChannel>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#customChannels.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through custom channels. To retrieve the next
|
||||
# page of results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
|
||||
#
|
||||
class Report
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The averages of the report. This is the same length as any other row in the
|
||||
# report; cells corresponding to dimension columns are empty.
|
||||
# Corresponds to the JSON property `averages`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :averages
|
||||
|
||||
# The header information of the columns requested in the report. This is a list
|
||||
# of headers; one for each dimension in the request, followed by one for each
|
||||
# metric in the request.
|
||||
# Corresponds to the JSON property `headers`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1::Report::Header>]
|
||||
attr_accessor :headers
|
||||
|
||||
# Kind this is, in this case adexchangeseller#report.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# The output rows of the report. Each row is a list of cells; one for each
|
||||
# dimension in the request, followed by one for each metric in the request. The
|
||||
# dimension cells contain strings, and the metric cells contain numbers.
|
||||
# Corresponds to the JSON property `rows`
|
||||
# @return [Array<Array<String>>]
|
||||
attr_accessor :rows
|
||||
|
||||
# The total number of rows matched by the report request. Fewer rows may be
|
||||
# returned in the response due to being limited by the row count requested or
|
||||
# the report row limit.
|
||||
# Corresponds to the JSON property `totalMatchedRows`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_matched_rows
|
||||
|
||||
# The totals of the report. This is the same length as any other row in the
|
||||
# report; cells corresponding to dimension columns are empty.
|
||||
# Corresponds to the JSON property `totals`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :totals
|
||||
|
||||
# Any warnings associated with generation of the report.
|
||||
# Corresponds to the JSON property `warnings`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :warnings
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@averages = args[:averages] if args.key?(:averages)
|
||||
@headers = args[:headers] if args.key?(:headers)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@rows = args[:rows] if args.key?(:rows)
|
||||
@total_matched_rows = args[:total_matched_rows] if args.key?(:total_matched_rows)
|
||||
@totals = args[:totals] if args.key?(:totals)
|
||||
@warnings = args[:warnings] if args.key?(:warnings)
|
||||
end
|
||||
|
||||
#
|
||||
class Header
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The currency of this column. Only present if the header type is
|
||||
# METRIC_CURRENCY.
|
||||
# Corresponds to the JSON property `currency`
|
||||
# @return [String]
|
||||
attr_accessor :currency
|
||||
|
||||
# The name of the header.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or
|
||||
# METRIC_CURRENCY.
|
||||
# Corresponds to the JSON property `type`
|
||||
# @return [String]
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@currency = args[:currency] if args.key?(:currency)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SavedReport
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique identifier of this saved report.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#savedReport.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# This saved report's name.
|
||||
# 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)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SavedReports
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The saved reports returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1::SavedReport>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#savedReports.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through saved reports. To retrieve the next
|
||||
# page of results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
|
||||
#
|
||||
class UrlChannel
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique identifier of this URL channel. This should be considered an opaque
|
||||
# identifier; it is not safe to rely on it being in any particular format.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#urlChannel.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# URL Pattern of this URL channel. Does not include "http://" or "https://".
|
||||
# Example: www.example.com/home
|
||||
# Corresponds to the JSON property `urlPattern`
|
||||
# @return [String]
|
||||
attr_accessor :url_pattern
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@url_pattern = args[:url_pattern] if args.key?(:url_pattern)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class UrlChannels
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The URL channels returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1::UrlChannel>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#urlChannels.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through URL channels. To retrieve the next
|
||||
# page of results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,248 @@
|
|||
# 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 AdexchangesellerV1
|
||||
|
||||
class AdClient
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AdClients
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AdUnit
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AdUnits
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CustomChannel
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class TargetingInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CustomChannels
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Report
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Header
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SavedReport
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SavedReports
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UrlChannel
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UrlChannels
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AdClient
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :arc_opt_in, as: 'arcOptIn'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :product_code, as: 'productCode'
|
||||
property :supports_reporting, as: 'supportsReporting'
|
||||
end
|
||||
end
|
||||
|
||||
class AdClients
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1::AdClient, decorator: Google::Apis::AdexchangesellerV1::AdClient::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class AdUnit
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :status, as: 'status'
|
||||
end
|
||||
end
|
||||
|
||||
class AdUnits
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1::AdUnit, decorator: Google::Apis::AdexchangesellerV1::AdUnit::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class CustomChannel
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :targeting_info, as: 'targetingInfo', class: Google::Apis::AdexchangesellerV1::CustomChannel::TargetingInfo, decorator: Google::Apis::AdexchangesellerV1::CustomChannel::TargetingInfo::Representation
|
||||
|
||||
end
|
||||
|
||||
class TargetingInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :ads_appear_on, as: 'adsAppearOn'
|
||||
property :description, as: 'description'
|
||||
property :location, as: 'location'
|
||||
property :site_language, as: 'siteLanguage'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class CustomChannels
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1::CustomChannel, decorator: Google::Apis::AdexchangesellerV1::CustomChannel::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class Report
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :averages, as: 'averages'
|
||||
collection :headers, as: 'headers', class: Google::Apis::AdexchangesellerV1::Report::Header, decorator: Google::Apis::AdexchangesellerV1::Report::Header::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
collection :rows, as: 'rows', :class => Array do
|
||||
include Representable::JSON::Collection
|
||||
items
|
||||
end
|
||||
|
||||
property :total_matched_rows, :numeric_string => true, as: 'totalMatchedRows'
|
||||
collection :totals, as: 'totals'
|
||||
collection :warnings, as: 'warnings'
|
||||
end
|
||||
|
||||
class Header
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :currency, as: 'currency'
|
||||
property :name, as: 'name'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class SavedReport
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class SavedReports
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1::SavedReport, decorator: Google::Apis::AdexchangesellerV1::SavedReport::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class UrlChannel
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :url_pattern, as: 'urlPattern'
|
||||
end
|
||||
end
|
||||
|
||||
class UrlChannels
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1::UrlChannel, decorator: Google::Apis::AdexchangesellerV1::UrlChannel::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,568 @@
|
|||
# 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 AdexchangesellerV1
|
||||
# Ad Exchange Seller API
|
||||
#
|
||||
# Accesses the inventory of Ad Exchange seller users and generates reports.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/adexchangeseller_v1'
|
||||
#
|
||||
# Adexchangeseller = Google::Apis::AdexchangesellerV1 # Alias the module
|
||||
# service = Adexchangeseller::AdExchangeSellerService.new
|
||||
#
|
||||
# @see https://developers.google.com/ad-exchange/seller-rest/
|
||||
class AdExchangeSellerService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'adexchangeseller/v1/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# List all ad clients in this Ad Exchange account.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of ad clients to include in the response, used for paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through ad clients. To retrieve the next
|
||||
# page, set this parameter to the value of "nextPageToken" from the previous
|
||||
# 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.
|
||||
# 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::AdexchangesellerV1::AdClients] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::AdClients]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_adclients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::AdClients::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::AdClients
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# Gets the specified ad unit in the specified ad client.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client for which to get the ad unit.
|
||||
# @param [String] ad_unit_id
|
||||
# Ad unit to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangesellerV1::AdUnit] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::AdUnit]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_adunit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::AdUnit::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::AdUnit
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all ad units in the specified ad client for this Ad Exchange account.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client for which to list ad units.
|
||||
# @param [Boolean] include_inactive
|
||||
# Whether to include inactive ad units. Default: true.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of ad units to include in the response, used for paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through ad units. To retrieve the next page,
|
||||
# set this parameter to the value of "nextPageToken" from the previous 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.
|
||||
# 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::AdexchangesellerV1::AdUnits] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::AdUnits]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_adunits(ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/adunits', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::AdUnits::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::AdUnits
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# List all custom channels which the specified ad unit belongs to.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client which contains the ad unit.
|
||||
# @param [String] ad_unit_id
|
||||
# Ad unit for which to list custom channels.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of custom channels to include in the response, used for
|
||||
# paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through custom channels. To retrieve the
|
||||
# next page, set this parameter to the value of "nextPageToken" from the
|
||||
# previous 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.
|
||||
# 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::AdexchangesellerV1::CustomChannels] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::CustomChannels]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_adunit_customchannels(ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}/customchannels', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::CustomChannels::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::CustomChannels
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# Get the specified custom channel from the specified ad client.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client which contains the custom channel.
|
||||
# @param [String] custom_channel_id
|
||||
# Custom channel to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangesellerV1::CustomChannel] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::CustomChannel]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customchannel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::CustomChannel::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::CustomChannel
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all custom channels in the specified ad client for this Ad Exchange
|
||||
# account.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client for which to list custom channels.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of custom channels to include in the response, used for
|
||||
# paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through custom channels. To retrieve the
|
||||
# next page, set this parameter to the value of "nextPageToken" from the
|
||||
# previous 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.
|
||||
# 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::AdexchangesellerV1::CustomChannels] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::CustomChannels]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customchannels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::CustomChannels::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::CustomChannels
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# List all ad units in the specified custom channel.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client which contains the custom channel.
|
||||
# @param [String] custom_channel_id
|
||||
# Custom channel for which to list ad units.
|
||||
# @param [Boolean] include_inactive
|
||||
# Whether to include inactive ad units. Default: true.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of ad units to include in the response, used for paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through ad units. To retrieve the next page,
|
||||
# set this parameter to the value of "nextPageToken" from the previous 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.
|
||||
# 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::AdexchangesellerV1::AdUnits] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::AdUnits]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customchannel_adunits(ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}/adunits', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::AdUnits::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::AdUnits
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
||||
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# Generate an Ad Exchange report based on the report request sent in the query
|
||||
# parameters. Returns the result as JSON; to retrieve output in CSV format
|
||||
# specify "alt=csv" as a query parameter.
|
||||
# @param [String] start_date
|
||||
# Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
||||
# @param [String] end_date
|
||||
# End of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
||||
# @param [Array<String>, String] dimension
|
||||
# Dimensions to base the report on.
|
||||
# @param [Array<String>, String] filter
|
||||
# Filters to be run on the report.
|
||||
# @param [String] locale
|
||||
# Optional locale to use for translating report output to a local language.
|
||||
# Defaults to "en_US" if not specified.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of rows of report data to return.
|
||||
# @param [Array<String>, String] metric
|
||||
# Numeric columns to include in the report.
|
||||
# @param [Array<String>, String] sort
|
||||
# The name of a dimension or metric to sort the resulting report on, optionally
|
||||
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
|
||||
# specified, the column is sorted ascending.
|
||||
# @param [Fixnum] start_index
|
||||
# Index of the first row of report data 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 [IO, String] download_dest
|
||||
# IO stream or filename to receive content download
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AdexchangesellerV1::Report] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::Report]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def generate_report(start_date, end_date, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
||||
if download_dest.nil?
|
||||
command = make_simple_command(:get, 'reports', options)
|
||||
else
|
||||
command = make_download_command(:get, 'reports', options)
|
||||
command.download_dest = download_dest
|
||||
end
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::Report::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::Report
|
||||
command.query['dimension'] = dimension unless dimension.nil?
|
||||
command.query['endDate'] = end_date unless end_date.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['locale'] = locale unless locale.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['metric'] = metric unless metric.nil?
|
||||
command.query['sort'] = sort unless sort.nil?
|
||||
command.query['startDate'] = start_date unless start_date.nil?
|
||||
command.query['startIndex'] = start_index unless start_index.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
|
||||
|
||||
# Generate an Ad Exchange report based on the saved report ID sent in the query
|
||||
# parameters.
|
||||
# @param [String] saved_report_id
|
||||
# The saved report to retrieve.
|
||||
# @param [String] locale
|
||||
# Optional locale to use for translating report output to a local language.
|
||||
# Defaults to "en_US" if not specified.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of rows of report data to return.
|
||||
# @param [Fixnum] start_index
|
||||
# Index of the first row of report data 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::AdexchangesellerV1::Report] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::Report]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def generate_report_saved(saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'reports/{savedReportId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::Report::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::Report
|
||||
command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
|
||||
command.query['locale'] = locale unless locale.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['startIndex'] = start_index unless start_index.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all saved reports in this Ad Exchange account.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of saved reports to include in the response, used for
|
||||
# paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through saved reports. To retrieve the next
|
||||
# page, set this parameter to the value of "nextPageToken" from the previous
|
||||
# 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.
|
||||
# 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::AdexchangesellerV1::SavedReports] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::SavedReports]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_report_saveds(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'reports/saved', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::SavedReports::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::SavedReports
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# List all URL channels in the specified ad client for this Ad Exchange account.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client for which to list URL channels.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of URL channels to include in the response, used for paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through URL channels. To retrieve the next
|
||||
# page, set this parameter to the value of "nextPageToken" from the previous
|
||||
# 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.
|
||||
# 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::AdexchangesellerV1::UrlChannels] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1::UrlChannels]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_urlchannels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/urlchannels', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1::UrlChannels::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1::UrlChannels
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,37 @@
|
|||
# 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/adexchangeseller_v1_1/service.rb'
|
||||
require 'google/apis/adexchangeseller_v1_1/classes.rb'
|
||||
require 'google/apis/adexchangeseller_v1_1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Ad Exchange Seller API
|
||||
#
|
||||
# Accesses the inventory of Ad Exchange seller users and generates reports.
|
||||
#
|
||||
# @see https://developers.google.com/ad-exchange/seller-rest/
|
||||
module AdexchangesellerV1_1
|
||||
VERSION = 'V1_1'
|
||||
REVISION = '20160805'
|
||||
|
||||
# View and manage your Ad Exchange data
|
||||
AUTH_ADEXCHANGE_SELLER = 'https://www.googleapis.com/auth/adexchange.seller'
|
||||
|
||||
# View your Ad Exchange data
|
||||
AUTH_ADEXCHANGE_SELLER_READONLY = 'https://www.googleapis.com/auth/adexchange.seller.readonly'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,842 @@
|
|||
# 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 AdexchangesellerV1_1
|
||||
|
||||
#
|
||||
class Account
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique identifier of this account.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#account.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Name of this account.
|
||||
# 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)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class AdClient
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Whether this ad client is opted in to ARC.
|
||||
# Corresponds to the JSON property `arcOptIn`
|
||||
# @return [Boolean]
|
||||
attr_accessor :arc_opt_in
|
||||
alias_method :arc_opt_in?, :arc_opt_in
|
||||
|
||||
# Unique identifier of this ad client.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#adClient.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# This ad client's product code, which corresponds to the PRODUCT_CODE report
|
||||
# dimension.
|
||||
# Corresponds to the JSON property `productCode`
|
||||
# @return [String]
|
||||
attr_accessor :product_code
|
||||
|
||||
# Whether this ad client supports being reported on.
|
||||
# Corresponds to the JSON property `supportsReporting`
|
||||
# @return [Boolean]
|
||||
attr_accessor :supports_reporting
|
||||
alias_method :supports_reporting?, :supports_reporting
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@arc_opt_in = args[:arc_opt_in] if args.key?(:arc_opt_in)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@product_code = args[:product_code] if args.key?(:product_code)
|
||||
@supports_reporting = args[:supports_reporting] if args.key?(:supports_reporting)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class AdClients
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The ad clients returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::AdClient>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#adClients.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through ad clients. To retrieve the next page
|
||||
# of results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
|
||||
#
|
||||
class AdUnit
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Identity code of this ad unit, not necessarily unique across ad clients.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [String]
|
||||
attr_accessor :code
|
||||
|
||||
# Unique identifier of this ad unit. This should be considered an opaque
|
||||
# identifier; it is not safe to rely on it being in any particular format.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#adUnit.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Name of this ad unit.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# Status of this ad unit. Possible values are:
|
||||
# NEW: Indicates that the ad unit was created within the last seven days and
|
||||
# does not yet have any activity associated with it.
|
||||
# ACTIVE: Indicates that there has been activity on this ad unit in the last
|
||||
# seven days.
|
||||
# INACTIVE: Indicates that there has been no activity on this ad unit in the
|
||||
# last seven days.
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class AdUnits
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The ad units returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::AdUnit>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#adUnits.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through ad units. To retrieve the next page of
|
||||
# results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
|
||||
#
|
||||
class Alert
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique identifier of this alert. This should be considered an opaque
|
||||
# identifier; it is not safe to rely on it being in any particular format.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#alert.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# The localized alert message.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
# Severity of this alert. Possible values: INFO, WARNING, SEVERE.
|
||||
# Corresponds to the JSON property `severity`
|
||||
# @return [String]
|
||||
attr_accessor :severity
|
||||
|
||||
# Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3,
|
||||
# ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY,
|
||||
# GRAYLISTED_PUBLISHER, API_HOLD.
|
||||
# Corresponds to the JSON property `type`
|
||||
# @return [String]
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
@severity = args[:severity] if args.key?(:severity)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class Alerts
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The alerts returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::Alert>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#alerts.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class CustomChannel
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Code of this custom channel, not necessarily unique across ad clients.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [String]
|
||||
attr_accessor :code
|
||||
|
||||
# Unique identifier of this custom channel. This should be considered an opaque
|
||||
# identifier; it is not safe to rely on it being in any particular format.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#customChannel.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Name of this custom channel.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The targeting information of this custom channel, if activated.
|
||||
# Corresponds to the JSON property `targetingInfo`
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::CustomChannel::TargetingInfo]
|
||||
attr_accessor :targeting_info
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@targeting_info = args[:targeting_info] if args.key?(:targeting_info)
|
||||
end
|
||||
|
||||
# The targeting information of this custom channel, if activated.
|
||||
class TargetingInfo
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The name used to describe this channel externally.
|
||||
# Corresponds to the JSON property `adsAppearOn`
|
||||
# @return [String]
|
||||
attr_accessor :ads_appear_on
|
||||
|
||||
# The external description of the channel.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# The locations in which ads appear. (Only valid for content and mobile content
|
||||
# ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT,
|
||||
# MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER,
|
||||
# BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are:
|
||||
# TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS.
|
||||
# Corresponds to the JSON property `location`
|
||||
# @return [String]
|
||||
attr_accessor :location
|
||||
|
||||
# The language of the sites ads will be displayed on.
|
||||
# Corresponds to the JSON property `siteLanguage`
|
||||
# @return [String]
|
||||
attr_accessor :site_language
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@ads_appear_on = args[:ads_appear_on] if args.key?(:ads_appear_on)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@location = args[:location] if args.key?(:location)
|
||||
@site_language = args[:site_language] if args.key?(:site_language)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class CustomChannels
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The custom channels returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::CustomChannel>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#customChannels.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through custom channels. To retrieve the next
|
||||
# page of results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
|
||||
#
|
||||
class Metadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::ReportingMetadataEntry>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#metadata.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PreferredDeal
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The name of the advertiser this deal is for.
|
||||
# Corresponds to the JSON property `advertiserName`
|
||||
# @return [String]
|
||||
attr_accessor :advertiser_name
|
||||
|
||||
# The name of the buyer network this deal is for.
|
||||
# Corresponds to the JSON property `buyerNetworkName`
|
||||
# @return [String]
|
||||
attr_accessor :buyer_network_name
|
||||
|
||||
# The currency code that applies to the fixed_cpm value. If not set then assumed
|
||||
# to be USD.
|
||||
# Corresponds to the JSON property `currencyCode`
|
||||
# @return [String]
|
||||
attr_accessor :currency_code
|
||||
|
||||
# Time when this deal stops being active in seconds since the epoch (GMT). If
|
||||
# not set then this deal is valid until manually disabled by the publisher.
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :end_time
|
||||
|
||||
# The fixed price for this preferred deal. In cpm micros of currency according
|
||||
# to currencyCode. If set, then this preferred deal is eligible for the fixed
|
||||
# price tier of buying (highest priority, pay exactly the configured fixed price)
|
||||
# .
|
||||
# Corresponds to the JSON property `fixedCpm`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :fixed_cpm
|
||||
|
||||
# Unique identifier of this preferred deal.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#preferredDeal.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Time when this deal becomes active in seconds since the epoch (GMT). If not
|
||||
# set then this deal is active immediately upon creation.
|
||||
# Corresponds to the JSON property `startTime`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :start_time
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@advertiser_name = args[:advertiser_name] if args.key?(:advertiser_name)
|
||||
@buyer_network_name = args[:buyer_network_name] if args.key?(:buyer_network_name)
|
||||
@currency_code = args[:currency_code] if args.key?(:currency_code)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@fixed_cpm = args[:fixed_cpm] if args.key?(:fixed_cpm)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@start_time = args[:start_time] if args.key?(:start_time)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PreferredDeals
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The preferred deals returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::PreferredDeal>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#preferredDeals.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class Report
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The averages of the report. This is the same length as any other row in the
|
||||
# report; cells corresponding to dimension columns are empty.
|
||||
# Corresponds to the JSON property `averages`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :averages
|
||||
|
||||
# The header information of the columns requested in the report. This is a list
|
||||
# of headers; one for each dimension in the request, followed by one for each
|
||||
# metric in the request.
|
||||
# Corresponds to the JSON property `headers`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::Report::Header>]
|
||||
attr_accessor :headers
|
||||
|
||||
# Kind this is, in this case adexchangeseller#report.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# The output rows of the report. Each row is a list of cells; one for each
|
||||
# dimension in the request, followed by one for each metric in the request. The
|
||||
# dimension cells contain strings, and the metric cells contain numbers.
|
||||
# Corresponds to the JSON property `rows`
|
||||
# @return [Array<Array<String>>]
|
||||
attr_accessor :rows
|
||||
|
||||
# The total number of rows matched by the report request. Fewer rows may be
|
||||
# returned in the response due to being limited by the row count requested or
|
||||
# the report row limit.
|
||||
# Corresponds to the JSON property `totalMatchedRows`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_matched_rows
|
||||
|
||||
# The totals of the report. This is the same length as any other row in the
|
||||
# report; cells corresponding to dimension columns are empty.
|
||||
# Corresponds to the JSON property `totals`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :totals
|
||||
|
||||
# Any warnings associated with generation of the report.
|
||||
# Corresponds to the JSON property `warnings`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :warnings
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@averages = args[:averages] if args.key?(:averages)
|
||||
@headers = args[:headers] if args.key?(:headers)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@rows = args[:rows] if args.key?(:rows)
|
||||
@total_matched_rows = args[:total_matched_rows] if args.key?(:total_matched_rows)
|
||||
@totals = args[:totals] if args.key?(:totals)
|
||||
@warnings = args[:warnings] if args.key?(:warnings)
|
||||
end
|
||||
|
||||
#
|
||||
class Header
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The currency of this column. Only present if the header type is
|
||||
# METRIC_CURRENCY.
|
||||
# Corresponds to the JSON property `currency`
|
||||
# @return [String]
|
||||
attr_accessor :currency
|
||||
|
||||
# The name of the header.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or
|
||||
# METRIC_CURRENCY.
|
||||
# Corresponds to the JSON property `type`
|
||||
# @return [String]
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@currency = args[:currency] if args.key?(:currency)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class ReportingMetadataEntry
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# For metrics this is a list of dimension IDs which the metric is compatible
|
||||
# with, for dimensions it is a list of compatibility groups the dimension
|
||||
# belongs to.
|
||||
# Corresponds to the JSON property `compatibleDimensions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :compatible_dimensions
|
||||
|
||||
# The names of the metrics the dimension or metric this reporting metadata entry
|
||||
# describes is compatible with.
|
||||
# Corresponds to the JSON property `compatibleMetrics`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :compatible_metrics
|
||||
|
||||
# Unique identifier of this reporting metadata entry, corresponding to the name
|
||||
# of the appropriate dimension or metric.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#reportingMetadataEntry.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# The names of the dimensions which the dimension or metric this reporting
|
||||
# metadata entry describes requires to also be present in order for the report
|
||||
# to be valid. Omitting these will not cause an error or warning, but may result
|
||||
# in data which cannot be correctly interpreted.
|
||||
# Corresponds to the JSON property `requiredDimensions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :required_dimensions
|
||||
|
||||
# The names of the metrics which the dimension or metric this reporting metadata
|
||||
# entry describes requires to also be present in order for the report to be
|
||||
# valid. Omitting these will not cause an error or warning, but may result in
|
||||
# data which cannot be correctly interpreted.
|
||||
# Corresponds to the JSON property `requiredMetrics`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :required_metrics
|
||||
|
||||
# The codes of the projects supported by the dimension or metric this reporting
|
||||
# metadata entry describes.
|
||||
# Corresponds to the JSON property `supportedProducts`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :supported_products
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@compatible_dimensions = args[:compatible_dimensions] if args.key?(:compatible_dimensions)
|
||||
@compatible_metrics = args[:compatible_metrics] if args.key?(:compatible_metrics)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@required_dimensions = args[:required_dimensions] if args.key?(:required_dimensions)
|
||||
@required_metrics = args[:required_metrics] if args.key?(:required_metrics)
|
||||
@supported_products = args[:supported_products] if args.key?(:supported_products)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SavedReport
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique identifier of this saved report.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#savedReport.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# This saved report's name.
|
||||
# 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)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class SavedReports
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The saved reports returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::SavedReport>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#savedReports.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through saved reports. To retrieve the next
|
||||
# page of results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
|
||||
#
|
||||
class UrlChannel
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique identifier of this URL channel. This should be considered an opaque
|
||||
# identifier; it is not safe to rely on it being in any particular format.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Kind of resource this is, in this case adexchangeseller#urlChannel.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# URL Pattern of this URL channel. Does not include "http://" or "https://".
|
||||
# Example: www.example.com/home
|
||||
# Corresponds to the JSON property `urlPattern`
|
||||
# @return [String]
|
||||
attr_accessor :url_pattern
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@url_pattern = args[:url_pattern] if args.key?(:url_pattern)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class UrlChannels
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ETag of this response for caching purposes.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# The URL channels returned in this list response.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::AdexchangesellerV1_1::UrlChannel>]
|
||||
attr_accessor :items
|
||||
|
||||
# Kind of list this is, in this case adexchangeseller#urlChannels.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Continuation token used to page through URL channels. To retrieve the next
|
||||
# page of results, set the next request's "pageToken" value to this.
|
||||
# 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)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@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
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,364 @@
|
|||
# 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 AdexchangesellerV1_1
|
||||
|
||||
class Account
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AdClient
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AdClients
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AdUnit
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AdUnits
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Alert
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Alerts
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CustomChannel
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class TargetingInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CustomChannels
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Metadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PreferredDeal
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PreferredDeals
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Report
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Header
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ReportingMetadataEntry
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SavedReport
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SavedReports
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UrlChannel
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UrlChannels
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Account
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class AdClient
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :arc_opt_in, as: 'arcOptIn'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :product_code, as: 'productCode'
|
||||
property :supports_reporting, as: 'supportsReporting'
|
||||
end
|
||||
end
|
||||
|
||||
class AdClients
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1_1::AdClient, decorator: Google::Apis::AdexchangesellerV1_1::AdClient::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class AdUnit
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :status, as: 'status'
|
||||
end
|
||||
end
|
||||
|
||||
class AdUnits
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1_1::AdUnit, decorator: Google::Apis::AdexchangesellerV1_1::AdUnit::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class Alert
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :message, as: 'message'
|
||||
property :severity, as: 'severity'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
end
|
||||
|
||||
class Alerts
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1_1::Alert, decorator: Google::Apis::AdexchangesellerV1_1::Alert::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class CustomChannel
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :targeting_info, as: 'targetingInfo', class: Google::Apis::AdexchangesellerV1_1::CustomChannel::TargetingInfo, decorator: Google::Apis::AdexchangesellerV1_1::CustomChannel::TargetingInfo::Representation
|
||||
|
||||
end
|
||||
|
||||
class TargetingInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :ads_appear_on, as: 'adsAppearOn'
|
||||
property :description, as: 'description'
|
||||
property :location, as: 'location'
|
||||
property :site_language, as: 'siteLanguage'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class CustomChannels
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1_1::CustomChannel, decorator: Google::Apis::AdexchangesellerV1_1::CustomChannel::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class Metadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1_1::ReportingMetadataEntry, decorator: Google::Apis::AdexchangesellerV1_1::ReportingMetadataEntry::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class PreferredDeal
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :advertiser_name, as: 'advertiserName'
|
||||
property :buyer_network_name, as: 'buyerNetworkName'
|
||||
property :currency_code, as: 'currencyCode'
|
||||
property :end_time, :numeric_string => true, as: 'endTime'
|
||||
property :fixed_cpm, :numeric_string => true, as: 'fixedCpm'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :start_time, :numeric_string => true, as: 'startTime'
|
||||
end
|
||||
end
|
||||
|
||||
class PreferredDeals
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1_1::PreferredDeal, decorator: Google::Apis::AdexchangesellerV1_1::PreferredDeal::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class Report
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :averages, as: 'averages'
|
||||
collection :headers, as: 'headers', class: Google::Apis::AdexchangesellerV1_1::Report::Header, decorator: Google::Apis::AdexchangesellerV1_1::Report::Header::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
collection :rows, as: 'rows', :class => Array do
|
||||
include Representable::JSON::Collection
|
||||
items
|
||||
end
|
||||
|
||||
property :total_matched_rows, :numeric_string => true, as: 'totalMatchedRows'
|
||||
collection :totals, as: 'totals'
|
||||
collection :warnings, as: 'warnings'
|
||||
end
|
||||
|
||||
class Header
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :currency, as: 'currency'
|
||||
property :name, as: 'name'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class ReportingMetadataEntry
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :compatible_dimensions, as: 'compatibleDimensions'
|
||||
collection :compatible_metrics, as: 'compatibleMetrics'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
collection :required_dimensions, as: 'requiredDimensions'
|
||||
collection :required_metrics, as: 'requiredMetrics'
|
||||
collection :supported_products, as: 'supportedProducts'
|
||||
end
|
||||
end
|
||||
|
||||
class SavedReport
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class SavedReports
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1_1::SavedReport, decorator: Google::Apis::AdexchangesellerV1_1::SavedReport::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class UrlChannel
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :url_pattern, as: 'urlPattern'
|
||||
end
|
||||
end
|
||||
|
||||
class UrlChannels
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, as: 'etag'
|
||||
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV1_1::UrlChannel, decorator: Google::Apis::AdexchangesellerV1_1::UrlChannel::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,771 @@
|
|||
# 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 AdexchangesellerV1_1
|
||||
# Ad Exchange Seller API
|
||||
#
|
||||
# Accesses the inventory of Ad Exchange seller users and generates reports.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/adexchangeseller_v1_1'
|
||||
#
|
||||
# Adexchangeseller = Google::Apis::AdexchangesellerV1_1 # Alias the module
|
||||
# service = Adexchangeseller::AdExchangeSellerService.new
|
||||
#
|
||||
# @see https://developers.google.com/ad-exchange/seller-rest/
|
||||
class AdExchangeSellerService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'adexchangeseller/v1.1/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Get information about the selected Ad Exchange account.
|
||||
# @param [String] account_id
|
||||
# Account to get information about. Tip: 'myaccount' is a valid 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.
|
||||
# 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::AdexchangesellerV1_1::Account] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::Account]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'accounts/{accountId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::Account::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::Account
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all ad clients in this Ad Exchange account.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of ad clients to include in the response, used for paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through ad clients. To retrieve the next
|
||||
# page, set this parameter to the value of "nextPageToken" from the previous
|
||||
# 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.
|
||||
# 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::AdexchangesellerV1_1::AdClients] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::AdClients]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_adclients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::AdClients::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::AdClients
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# Gets the specified ad unit in the specified ad client.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client for which to get the ad unit.
|
||||
# @param [String] ad_unit_id
|
||||
# Ad unit to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangesellerV1_1::AdUnit] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::AdUnit]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_adunit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::AdUnit::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::AdUnit
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all ad units in the specified ad client for this Ad Exchange account.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client for which to list ad units.
|
||||
# @param [Boolean] include_inactive
|
||||
# Whether to include inactive ad units. Default: true.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of ad units to include in the response, used for paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through ad units. To retrieve the next page,
|
||||
# set this parameter to the value of "nextPageToken" from the previous 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.
|
||||
# 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::AdexchangesellerV1_1::AdUnits] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::AdUnits]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_adunits(ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/adunits', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::AdUnits::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::AdUnits
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# List all custom channels which the specified ad unit belongs to.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client which contains the ad unit.
|
||||
# @param [String] ad_unit_id
|
||||
# Ad unit for which to list custom channels.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of custom channels to include in the response, used for
|
||||
# paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through custom channels. To retrieve the
|
||||
# next page, set this parameter to the value of "nextPageToken" from the
|
||||
# previous 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.
|
||||
# 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::AdexchangesellerV1_1::CustomChannels] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::CustomChannels]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_adunit_customchannels(ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}/customchannels', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::CustomChannels::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::CustomChannels
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# List the alerts for this Ad Exchange account.
|
||||
# @param [String] locale
|
||||
# The locale to use for translating alert messages. The account locale will be
|
||||
# used if this is not supplied. The AdSense default (English) will be used if
|
||||
# the supplied locale is invalid or unsupported.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangesellerV1_1::Alerts] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::Alerts]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_alerts(locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'alerts', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::Alerts::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::Alerts
|
||||
command.query['locale'] = locale unless locale.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
|
||||
|
||||
# Get the specified custom channel from the specified ad client.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client which contains the custom channel.
|
||||
# @param [String] custom_channel_id
|
||||
# Custom channel to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::AdexchangesellerV1_1::CustomChannel] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::CustomChannel]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customchannel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::CustomChannel::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::CustomChannel
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all custom channels in the specified ad client for this Ad Exchange
|
||||
# account.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client for which to list custom channels.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of custom channels to include in the response, used for
|
||||
# paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through custom channels. To retrieve the
|
||||
# next page, set this parameter to the value of "nextPageToken" from the
|
||||
# previous 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.
|
||||
# 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::AdexchangesellerV1_1::CustomChannels] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::CustomChannels]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customchannels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::CustomChannels::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::CustomChannels
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# List all ad units in the specified custom channel.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client which contains the custom channel.
|
||||
# @param [String] custom_channel_id
|
||||
# Custom channel for which to list ad units.
|
||||
# @param [Boolean] include_inactive
|
||||
# Whether to include inactive ad units. Default: true.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of ad units to include in the response, used for paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through ad units. To retrieve the next page,
|
||||
# set this parameter to the value of "nextPageToken" from the previous 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.
|
||||
# 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::AdexchangesellerV1_1::AdUnits] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::AdUnits]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customchannel_adunits(ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}/adunits', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::AdUnits::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::AdUnits
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
||||
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# List the metadata for the dimensions available to this AdExchange account.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangesellerV1_1::Metadata] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::Metadata]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metadatum_dimensions(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'metadata/dimensions', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::Metadata::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::Metadata
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List the metadata for the metrics available to this AdExchange account.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangesellerV1_1::Metadata] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::Metadata]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metadatum_metrics(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'metadata/metrics', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::Metadata::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::Metadata
|
||||
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
|
||||
|
||||
# Get information about the selected Ad Exchange Preferred Deal.
|
||||
# @param [String] deal_id
|
||||
# Preferred deal to get information about.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangesellerV1_1::PreferredDeal] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::PreferredDeal]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_preferreddeal(deal_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'preferreddeals/{dealId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::PreferredDeal::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::PreferredDeal
|
||||
command.params['dealId'] = deal_id unless deal_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List the preferred deals for this Ad Exchange account.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AdexchangesellerV1_1::PreferredDeals] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::PreferredDeals]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_preferreddeals(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'preferreddeals', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::PreferredDeals::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::PreferredDeals
|
||||
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
|
||||
|
||||
# Generate an Ad Exchange report based on the report request sent in the query
|
||||
# parameters. Returns the result as JSON; to retrieve output in CSV format
|
||||
# specify "alt=csv" as a query parameter.
|
||||
# @param [String] start_date
|
||||
# Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
||||
# @param [String] end_date
|
||||
# End of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
||||
# @param [Array<String>, String] dimension
|
||||
# Dimensions to base the report on.
|
||||
# @param [Array<String>, String] filter
|
||||
# Filters to be run on the report.
|
||||
# @param [String] locale
|
||||
# Optional locale to use for translating report output to a local language.
|
||||
# Defaults to "en_US" if not specified.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of rows of report data to return.
|
||||
# @param [Array<String>, String] metric
|
||||
# Numeric columns to include in the report.
|
||||
# @param [Array<String>, String] sort
|
||||
# The name of a dimension or metric to sort the resulting report on, optionally
|
||||
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
|
||||
# specified, the column is sorted ascending.
|
||||
# @param [Fixnum] start_index
|
||||
# Index of the first row of report data 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 [IO, String] download_dest
|
||||
# IO stream or filename to receive content download
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AdexchangesellerV1_1::Report] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::Report]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def generate_report(start_date, end_date, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
||||
if download_dest.nil?
|
||||
command = make_simple_command(:get, 'reports', options)
|
||||
else
|
||||
command = make_download_command(:get, 'reports', options)
|
||||
command.download_dest = download_dest
|
||||
end
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::Report::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::Report
|
||||
command.query['dimension'] = dimension unless dimension.nil?
|
||||
command.query['endDate'] = end_date unless end_date.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['locale'] = locale unless locale.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['metric'] = metric unless metric.nil?
|
||||
command.query['sort'] = sort unless sort.nil?
|
||||
command.query['startDate'] = start_date unless start_date.nil?
|
||||
command.query['startIndex'] = start_index unless start_index.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
|
||||
|
||||
# Generate an Ad Exchange report based on the saved report ID sent in the query
|
||||
# parameters.
|
||||
# @param [String] saved_report_id
|
||||
# The saved report to retrieve.
|
||||
# @param [String] locale
|
||||
# Optional locale to use for translating report output to a local language.
|
||||
# Defaults to "en_US" if not specified.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of rows of report data to return.
|
||||
# @param [Fixnum] start_index
|
||||
# Index of the first row of report data 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::AdexchangesellerV1_1::Report] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::Report]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def generate_report_saved(saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'reports/{savedReportId}', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::Report::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::Report
|
||||
command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
|
||||
command.query['locale'] = locale unless locale.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['startIndex'] = start_index unless start_index.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all saved reports in this Ad Exchange account.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of saved reports to include in the response, used for
|
||||
# paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through saved reports. To retrieve the next
|
||||
# page, set this parameter to the value of "nextPageToken" from the previous
|
||||
# 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.
|
||||
# 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::AdexchangesellerV1_1::SavedReports] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::SavedReports]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_report_saveds(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'reports/saved', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::SavedReports::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::SavedReports
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
# List all URL channels in the specified ad client for this Ad Exchange account.
|
||||
# @param [String] ad_client_id
|
||||
# Ad client for which to list URL channels.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of URL channels to include in the response, used for paging.
|
||||
# @param [String] page_token
|
||||
# A continuation token, used to page through URL channels. To retrieve the next
|
||||
# page, set this parameter to the value of "nextPageToken" from the previous
|
||||
# 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.
|
||||
# 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::AdexchangesellerV1_1::UrlChannels] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AdexchangesellerV1_1::UrlChannels]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_urlchannels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'adclients/{adClientId}/urlchannels', options)
|
||||
command.response_representation = Google::Apis::AdexchangesellerV1_1::UrlChannels::Representation
|
||||
command.response_class = Google::Apis::AdexchangesellerV1_1::UrlChannels
|
||||
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -26,7 +26,7 @@ module Google
|
|||
# @see https://developers.google.com/admin-sdk/directory/
|
||||
module AdminDirectoryV1
|
||||
VERSION = 'DirectoryV1'
|
||||
REVISION = '20170530'
|
||||
REVISION = '20170712'
|
||||
|
||||
# View and manage customer related information
|
||||
AUTH_ADMIN_DIRECTORY_CUSTOMER = 'https://www.googleapis.com/auth/admin.directory.customer'
|
||||
|
|
|
@ -637,6 +637,26 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# JSON request template for moving ChromeOs Device to given OU in Directory
|
||||
# Devices API.
|
||||
class ChromeOsMoveDevicesToOu
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ChromeOs Devices to be moved to OU
|
||||
# Corresponds to the JSON property `deviceIds`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :device_ids
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@device_ids = args[:device_ids] if args.key?(:device_ids)
|
||||
end
|
||||
end
|
||||
|
||||
# JSON template for Customer Resource object in Directory API.
|
||||
class Customer
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -2418,6 +2438,11 @@ module Google
|
|||
attr_accessor :is_mailbox_setup
|
||||
alias_method :is_mailbox_setup?, :is_mailbox_setup
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `keywords`
|
||||
# @return [Object]
|
||||
attr_accessor :keywords
|
||||
|
||||
# Kind of resource this is.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
|
@ -2546,6 +2571,7 @@ module Google
|
|||
@is_enforced_in2_sv = args[:is_enforced_in2_sv] if args.key?(:is_enforced_in2_sv)
|
||||
@is_enrolled_in2_sv = args[:is_enrolled_in2_sv] if args.key?(:is_enrolled_in2_sv)
|
||||
@is_mailbox_setup = args[:is_mailbox_setup] if args.key?(:is_mailbox_setup)
|
||||
@keywords = args[:keywords] if args.key?(:keywords)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@languages = args[:languages] if args.key?(:languages)
|
||||
@last_login_time = args[:last_login_time] if args.key?(:last_login_time)
|
||||
|
@ -2820,6 +2846,40 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# JSON template for a keyword entry.
|
||||
class UserKeyword
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Custom Type.
|
||||
# Corresponds to the JSON property `customType`
|
||||
# @return [String]
|
||||
attr_accessor :custom_type
|
||||
|
||||
# Each entry can have a type which indicates standard type of that entry. For
|
||||
# example, keyword could be of type occupation or outlook. In addition to the
|
||||
# standard type, an entry can have a custom type and can give it any name. Such
|
||||
# types should have the CUSTOM value as type and also have a customType value.
|
||||
# Corresponds to the JSON property `type`
|
||||
# @return [String]
|
||||
attr_accessor :type
|
||||
|
||||
# Keyword.
|
||||
# Corresponds to the JSON property `value`
|
||||
# @return [String]
|
||||
attr_accessor :value
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@custom_type = args[:custom_type] if args.key?(:custom_type)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
@value = args[:value] if args.key?(:value)
|
||||
end
|
||||
end
|
||||
|
||||
# JSON template for a language entry.
|
||||
class UserLanguage
|
||||
include Google::Apis::Core::Hashable
|
||||
|
|
|
@ -94,6 +94,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ChromeOsMoveDevicesToOu
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Customer
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -316,6 +322,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UserKeyword
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UserLanguage
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -561,6 +573,13 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class ChromeOsMoveDevicesToOu
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :device_ids, as: 'deviceIds'
|
||||
end
|
||||
end
|
||||
|
||||
class Customer
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -998,6 +1017,7 @@ module Google
|
|||
property :is_enforced_in2_sv, as: 'isEnforcedIn2Sv'
|
||||
property :is_enrolled_in2_sv, as: 'isEnrolledIn2Sv'
|
||||
property :is_mailbox_setup, as: 'isMailboxSetup'
|
||||
property :keywords, as: 'keywords'
|
||||
property :kind, as: 'kind'
|
||||
property :languages, as: 'languages'
|
||||
property :last_login_time, as: 'lastLoginTime', type: DateTime
|
||||
|
@ -1081,6 +1101,15 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class UserKeyword
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :custom_type, as: 'customType'
|
||||
property :type, as: 'type'
|
||||
property :value, as: 'value'
|
||||
end
|
||||
end
|
||||
|
||||
class UserLanguage
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -337,6 +337,45 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Move or insert multiple Chrome OS Devices to Organization Unit
|
||||
# @param [String] customer_id
|
||||
# Immutable ID of the G Suite account
|
||||
# @param [String] org_unit_path
|
||||
# Full path of the target organization unit or its Id
|
||||
# @param [Google::Apis::AdminDirectoryV1::ChromeOsMoveDevicesToOu] chrome_os_move_devices_to_ou_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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def move_chromeosdevice_devices_to_ou(customer_id, org_unit_path, chrome_os_move_devices_to_ou_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'customer/{customerId}/devices/chromeos/moveDevicesToOu', options)
|
||||
command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsMoveDevicesToOu::Representation
|
||||
command.request_object = chrome_os_move_devices_to_ou_object
|
||||
command.params['customerId'] = customer_id unless customer_id.nil?
|
||||
command.query['orgUnitPath'] = org_unit_path unless org_unit_path.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
|
||||
|
||||
# Update Chrome OS Device. This method supports patch semantics.
|
||||
# @param [String] customer_id
|
||||
# Immutable ID of the G Suite account
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
# 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/analytics_v2_4/service.rb'
|
||||
require 'google/apis/analytics_v2_4/classes.rb'
|
||||
require 'google/apis/analytics_v2_4/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Analytics API
|
||||
#
|
||||
# Views and manages your Google Analytics data.
|
||||
#
|
||||
# @see https://developers.google.com/analytics/
|
||||
module AnalyticsV2_4
|
||||
VERSION = 'V2_4'
|
||||
REVISION = '20170321'
|
||||
|
||||
# View and manage your Google Analytics data
|
||||
AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics'
|
||||
|
||||
# View your Google Analytics data
|
||||
AUTH_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/analytics.readonly'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,26 @@
|
|||
# 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 AnalyticsV2_4
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,26 @@
|
|||
# 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 AnalyticsV2_4
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,345 @@
|
|||
# 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 AnalyticsV2_4
|
||||
# Google Analytics API
|
||||
#
|
||||
# Views and manages your Google Analytics data.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/analytics_v2_4'
|
||||
#
|
||||
# Analytics = Google::Apis::AnalyticsV2_4 # Alias the module
|
||||
# service = Analytics::AnalyticsService.new
|
||||
#
|
||||
# @see https://developers.google.com/analytics/
|
||||
class AnalyticsService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'analytics/v2.4/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Returns Analytics report data for a view (profile).
|
||||
# @param [String] ids
|
||||
# Unique table ID for retrieving report data. Table ID is of the form ga:XXXX,
|
||||
# where XXXX is the Analytics view (profile) ID.
|
||||
# @param [String] start_date
|
||||
# Start date for fetching report data. All requests should specify a start date
|
||||
# formatted as YYYY-MM-DD.
|
||||
# @param [String] end_date
|
||||
# End date for fetching report data. All requests should specify an end date
|
||||
# formatted as YYYY-MM-DD.
|
||||
# @param [String] metrics
|
||||
# A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'.
|
||||
# At least one metric must be specified to retrieve a valid Analytics report.
|
||||
# @param [String] dimensions
|
||||
# A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.
|
||||
# @param [String] filters
|
||||
# A comma-separated list of dimension or metric filters to be applied to the
|
||||
# report data.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of entries to include in this feed.
|
||||
# @param [String] segment
|
||||
# An Analytics advanced segment to be applied to the report data.
|
||||
# @param [String] sort
|
||||
# A comma-separated list of dimensions or metrics that determine the sort order
|
||||
# for the report data.
|
||||
# @param [Fixnum] start_index
|
||||
# An index of the first entity to retrieve. Use this parameter as a pagination
|
||||
# mechanism along with the max-results parameter.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datum(ids, start_date, end_date, metrics, dimensions: nil, filters: nil, max_results: nil, segment: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'data', options)
|
||||
command.query['dimensions'] = dimensions unless dimensions.nil?
|
||||
command.query['end-date'] = end_date unless end_date.nil?
|
||||
command.query['filters'] = filters unless filters.nil?
|
||||
command.query['ids'] = ids unless ids.nil?
|
||||
command.query['max-results'] = max_results unless max_results.nil?
|
||||
command.query['metrics'] = metrics unless metrics.nil?
|
||||
command.query['segment'] = segment unless segment.nil?
|
||||
command.query['sort'] = sort unless sort.nil?
|
||||
command.query['start-date'] = start_date unless start_date.nil?
|
||||
command.query['start-index'] = start_index unless start_index.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists all accounts to which the user has access.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of accounts to include in this response.
|
||||
# @param [Fixnum] start_index
|
||||
# An index of the first account to retrieve. Use this parameter as a pagination
|
||||
# mechanism along with the max-results parameter.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_management_accounts(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'management/accounts', options)
|
||||
command.query['max-results'] = max_results unless max_results.nil?
|
||||
command.query['start-index'] = start_index unless start_index.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists goals to which the user has access.
|
||||
# @param [String] account_id
|
||||
# Account ID to retrieve goals for. Can either be a specific account ID or '~all'
|
||||
# , which refers to all the accounts that user has access to.
|
||||
# @param [String] web_property_id
|
||||
# Web property ID to retrieve goals for. Can either be a specific web property
|
||||
# ID or '~all', which refers to all the web properties that user has access to.
|
||||
# @param [String] profile_id
|
||||
# View (Profile) ID to retrieve goals for. Can either be a specific view (
|
||||
# profile) ID or '~all', which refers to all the views (profiles) that user has
|
||||
# access to.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of goals to include in this response.
|
||||
# @param [Fixnum] start_index
|
||||
# An index of the first goal to retrieve. Use this parameter as a pagination
|
||||
# mechanism along with the max-results parameter.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_management_goals(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals', options)
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
|
||||
command.params['profileId'] = profile_id unless profile_id.nil?
|
||||
command.query['max-results'] = max_results unless max_results.nil?
|
||||
command.query['start-index'] = start_index unless start_index.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists views (profiles) to which the user has access.
|
||||
# @param [String] account_id
|
||||
# Account ID for the views (profiles) to retrieve. Can either be a specific
|
||||
# account ID or '~all', which refers to all the accounts to which the user has
|
||||
# access.
|
||||
# @param [String] web_property_id
|
||||
# Web property ID for the views (profiles) to retrieve. Can either be a specific
|
||||
# web property ID or '~all', which refers to all the web properties to which the
|
||||
# user has access.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of views (profiles) to include in this response.
|
||||
# @param [Fixnum] start_index
|
||||
# An index of the first entity to retrieve. Use this parameter as a pagination
|
||||
# mechanism along with the max-results parameter.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_management_profiles(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles', options)
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
|
||||
command.query['max-results'] = max_results unless max_results.nil?
|
||||
command.query['start-index'] = start_index unless start_index.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists advanced segments to which the user has access.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of advanced segments to include in this response.
|
||||
# @param [Fixnum] start_index
|
||||
# An index of the first advanced segment to retrieve. Use this parameter as a
|
||||
# pagination mechanism along with the max-results parameter.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_management_segments(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'management/segments', options)
|
||||
command.query['max-results'] = max_results unless max_results.nil?
|
||||
command.query['start-index'] = start_index unless start_index.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists web properties to which the user has access.
|
||||
# @param [String] account_id
|
||||
# Account ID to retrieve web properties for. Can either be a specific account ID
|
||||
# or '~all', which refers to all the accounts that user has access to.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of web properties to include in this response.
|
||||
# @param [Fixnum] start_index
|
||||
# An index of the first entity to retrieve. Use this parameter as a pagination
|
||||
# mechanism along with the max-results parameter.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_management_webproperties(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'management/accounts/{accountId}/webproperties', options)
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.query['max-results'] = max_results unless max_results.nil?
|
||||
command.query['start-index'] = start_index unless start_index.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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/androidpublisher_v1/service.rb'
|
||||
require 'google/apis/androidpublisher_v1/classes.rb'
|
||||
require 'google/apis/androidpublisher_v1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Play Developer API
|
||||
#
|
||||
# Lets Android application developers access their Google Play accounts.
|
||||
#
|
||||
# @see https://developers.google.com/android-publisher
|
||||
module AndroidpublisherV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20170222'
|
||||
|
||||
# View and manage your Google Play Developer account
|
||||
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,67 @@
|
|||
# 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 AndroidpublisherV1
|
||||
|
||||
# A SubscriptionPurchase resource indicates the status of a user's subscription
|
||||
# purchase.
|
||||
class SubscriptionPurchase
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Whether the subscription will automatically be renewed when it reaches its
|
||||
# current expiry time.
|
||||
# Corresponds to the JSON property `autoRenewing`
|
||||
# @return [Boolean]
|
||||
attr_accessor :auto_renewing
|
||||
alias_method :auto_renewing?, :auto_renewing
|
||||
|
||||
# Time at which the subscription was granted, in milliseconds since the Epoch.
|
||||
# Corresponds to the JSON property `initiationTimestampMsec`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :initiation_timestamp_msec
|
||||
|
||||
# This kind represents a subscriptionPurchase object in the androidpublisher
|
||||
# service.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Time at which the subscription will expire, in milliseconds since the Epoch.
|
||||
# Corresponds to the JSON property `validUntilTimestampMsec`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :valid_until_timestamp_msec
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@auto_renewing = args[:auto_renewing] if args.key?(:auto_renewing)
|
||||
@initiation_timestamp_msec = args[:initiation_timestamp_msec] if args.key?(:initiation_timestamp_msec)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@valid_until_timestamp_msec = args[:valid_until_timestamp_msec] if args.key?(:valid_until_timestamp_msec)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,42 @@
|
|||
# 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 AndroidpublisherV1
|
||||
|
||||
class SubscriptionPurchase
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SubscriptionPurchase
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auto_renewing, as: 'autoRenewing'
|
||||
property :initiation_timestamp_msec, :numeric_string => true, as: 'initiationTimestampMsec'
|
||||
property :kind, as: 'kind'
|
||||
property :valid_until_timestamp_msec, :numeric_string => true, as: 'validUntilTimestampMsec'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,150 @@
|
|||
# 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 AndroidpublisherV1
|
||||
# Google Play Developer API
|
||||
#
|
||||
# Lets Android application developers access their Google Play accounts.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/androidpublisher_v1'
|
||||
#
|
||||
# Androidpublisher = Google::Apis::AndroidpublisherV1 # Alias the module
|
||||
# service = Androidpublisher::AndroidPublisherService.new
|
||||
#
|
||||
# @see https://developers.google.com/android-publisher
|
||||
class AndroidPublisherService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'androidpublisher/v1/applications/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Cancels a user's subscription purchase. The subscription remains valid until
|
||||
# its expiration time.
|
||||
# @param [String] package_name
|
||||
# The package name of the application for which this subscription was purchased (
|
||||
# for example, 'com.some.thing').
|
||||
# @param [String] subscription_id
|
||||
# The purchased subscription ID (for example, 'monthly001').
|
||||
# @param [String] token
|
||||
# The token provided to the user's device when the subscription was purchased.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{packageName}/subscriptions/{subscriptionId}/purchases/{token}/cancel', options)
|
||||
command.params['packageName'] = package_name unless package_name.nil?
|
||||
command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
|
||||
command.params['token'] = token unless 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
|
||||
|
||||
# Checks whether a user's subscription purchase is valid and returns its expiry
|
||||
# time.
|
||||
# @param [String] package_name
|
||||
# The package name of the application for which this subscription was purchased (
|
||||
# for example, 'com.some.thing').
|
||||
# @param [String] subscription_id
|
||||
# The purchased subscription ID (for example, 'monthly001').
|
||||
# @param [String] token
|
||||
# The token provided to the user's device when the subscription was purchased.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AndroidpublisherV1::SubscriptionPurchase] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroidpublisherV1::SubscriptionPurchase]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{packageName}/subscriptions/{subscriptionId}/purchases/{token}', options)
|
||||
command.response_representation = Google::Apis::AndroidpublisherV1::SubscriptionPurchase::Representation
|
||||
command.response_class = Google::Apis::AndroidpublisherV1::SubscriptionPurchase
|
||||
command.params['packageName'] = package_name unless package_name.nil?
|
||||
command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
|
||||
command.params['token'] = token unless 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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/androidpublisher_v1_1/service.rb'
|
||||
require 'google/apis/androidpublisher_v1_1/classes.rb'
|
||||
require 'google/apis/androidpublisher_v1_1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Play Developer API
|
||||
#
|
||||
# Lets Android application developers access their Google Play accounts.
|
||||
#
|
||||
# @see https://developers.google.com/android-publisher
|
||||
module AndroidpublisherV1_1
|
||||
VERSION = 'V1_1'
|
||||
REVISION = '20170808'
|
||||
|
||||
# View and manage your Google Play Developer account
|
||||
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,123 @@
|
|||
# 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 AndroidpublisherV1_1
|
||||
|
||||
# An InappPurchase resource indicates the status of a user's inapp product
|
||||
# purchase.
|
||||
class InappPurchase
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The consumption state of the inapp product. Possible values are:
|
||||
# - Yet to be consumed
|
||||
# - Consumed
|
||||
# Corresponds to the JSON property `consumptionState`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :consumption_state
|
||||
|
||||
# A developer-specified string that contains supplemental information about an
|
||||
# order.
|
||||
# Corresponds to the JSON property `developerPayload`
|
||||
# @return [String]
|
||||
attr_accessor :developer_payload
|
||||
|
||||
# This kind represents an inappPurchase object in the androidpublisher service.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# The order id associated with the purchase of the inapp product.
|
||||
# Corresponds to the JSON property `orderId`
|
||||
# @return [String]
|
||||
attr_accessor :order_id
|
||||
|
||||
# The purchase state of the order. Possible values are:
|
||||
# - Purchased
|
||||
# - Cancelled
|
||||
# Corresponds to the JSON property `purchaseState`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :purchase_state
|
||||
|
||||
# The time the product was purchased, in milliseconds since the epoch (Jan 1,
|
||||
# 1970).
|
||||
# Corresponds to the JSON property `purchaseTime`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :purchase_time
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@consumption_state = args[:consumption_state] if args.key?(:consumption_state)
|
||||
@developer_payload = args[:developer_payload] if args.key?(:developer_payload)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@order_id = args[:order_id] if args.key?(:order_id)
|
||||
@purchase_state = args[:purchase_state] if args.key?(:purchase_state)
|
||||
@purchase_time = args[:purchase_time] if args.key?(:purchase_time)
|
||||
end
|
||||
end
|
||||
|
||||
# A SubscriptionPurchase resource indicates the status of a user's subscription
|
||||
# purchase.
|
||||
class SubscriptionPurchase
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Whether the subscription will automatically be renewed when it reaches its
|
||||
# current expiry time.
|
||||
# Corresponds to the JSON property `autoRenewing`
|
||||
# @return [Boolean]
|
||||
attr_accessor :auto_renewing
|
||||
alias_method :auto_renewing?, :auto_renewing
|
||||
|
||||
# Time at which the subscription was granted, in milliseconds since the Epoch.
|
||||
# Corresponds to the JSON property `initiationTimestampMsec`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :initiation_timestamp_msec
|
||||
|
||||
# This kind represents a subscriptionPurchase object in the androidpublisher
|
||||
# service.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Time at which the subscription will expire, in milliseconds since the Epoch.
|
||||
# Corresponds to the JSON property `validUntilTimestampMsec`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :valid_until_timestamp_msec
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@auto_renewing = args[:auto_renewing] if args.key?(:auto_renewing)
|
||||
@initiation_timestamp_msec = args[:initiation_timestamp_msec] if args.key?(:initiation_timestamp_msec)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@valid_until_timestamp_msec = args[:valid_until_timestamp_msec] if args.key?(:valid_until_timestamp_msec)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,60 @@
|
|||
# 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 AndroidpublisherV1_1
|
||||
|
||||
class InappPurchase
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SubscriptionPurchase
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class InappPurchase
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :consumption_state, as: 'consumptionState'
|
||||
property :developer_payload, as: 'developerPayload'
|
||||
property :kind, as: 'kind'
|
||||
property :order_id, as: 'orderId'
|
||||
property :purchase_state, as: 'purchaseState'
|
||||
property :purchase_time, :numeric_string => true, as: 'purchaseTime'
|
||||
end
|
||||
end
|
||||
|
||||
class SubscriptionPurchase
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auto_renewing, as: 'autoRenewing'
|
||||
property :initiation_timestamp_msec, :numeric_string => true, as: 'initiationTimestampMsec'
|
||||
property :kind, as: 'kind'
|
||||
property :valid_until_timestamp_msec, :numeric_string => true, as: 'validUntilTimestampMsec'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,192 @@
|
|||
# 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 AndroidpublisherV1_1
|
||||
# Google Play Developer API
|
||||
#
|
||||
# Lets Android application developers access their Google Play accounts.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/androidpublisher_v1_1'
|
||||
#
|
||||
# Androidpublisher = Google::Apis::AndroidpublisherV1_1 # Alias the module
|
||||
# service = Androidpublisher::AndroidPublisherService.new
|
||||
#
|
||||
# @see https://developers.google.com/android-publisher
|
||||
class AndroidPublisherService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'androidpublisher/v1.1/applications/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Checks the purchase and consumption status of an inapp item.
|
||||
# @param [String] package_name
|
||||
# The package name of the application the inapp product was sold in (for example,
|
||||
# 'com.some.thing').
|
||||
# @param [String] product_id
|
||||
# The inapp product SKU (for example, 'com.some.thing.inapp1').
|
||||
# @param [String] token
|
||||
# The token provided to the user's device when the inapp product was purchased.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AndroidpublisherV1_1::InappPurchase] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroidpublisherV1_1::InappPurchase]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_inapppurchase(package_name, product_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{packageName}/inapp/{productId}/purchases/{token}', options)
|
||||
command.response_representation = Google::Apis::AndroidpublisherV1_1::InappPurchase::Representation
|
||||
command.response_class = Google::Apis::AndroidpublisherV1_1::InappPurchase
|
||||
command.params['packageName'] = package_name unless package_name.nil?
|
||||
command.params['productId'] = product_id unless product_id.nil?
|
||||
command.params['token'] = token unless 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
|
||||
|
||||
# Cancels a user's subscription purchase. The subscription remains valid until
|
||||
# its expiration time.
|
||||
# @param [String] package_name
|
||||
# The package name of the application for which this subscription was purchased (
|
||||
# for example, 'com.some.thing').
|
||||
# @param [String] subscription_id
|
||||
# The purchased subscription ID (for example, 'monthly001').
|
||||
# @param [String] token
|
||||
# The token provided to the user's device when the subscription was purchased.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{packageName}/subscriptions/{subscriptionId}/purchases/{token}/cancel', options)
|
||||
command.params['packageName'] = package_name unless package_name.nil?
|
||||
command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
|
||||
command.params['token'] = token unless 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
|
||||
|
||||
# Checks whether a user's subscription purchase is valid and returns its expiry
|
||||
# time.
|
||||
# @param [String] package_name
|
||||
# The package name of the application for which this subscription was purchased (
|
||||
# for example, 'com.some.thing').
|
||||
# @param [String] subscription_id
|
||||
# The purchased subscription ID (for example, 'monthly001').
|
||||
# @param [String] token
|
||||
# The token provided to the user's device when the subscription was purchased.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::AndroidpublisherV1_1::SubscriptionPurchase] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroidpublisherV1_1::SubscriptionPurchase]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_purchase(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{packageName}/subscriptions/{subscriptionId}/purchases/{token}', options)
|
||||
command.response_representation = Google::Apis::AndroidpublisherV1_1::SubscriptionPurchase::Representation
|
||||
command.response_class = Google::Apis::AndroidpublisherV1_1::SubscriptionPurchase
|
||||
command.params['packageName'] = package_name unless package_name.nil?
|
||||
command.params['subscriptionId'] = subscription_id unless subscription_id.nil?
|
||||
command.params['token'] = token unless 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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,41 @@
|
|||
# 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/appengine_v1alpha/service.rb'
|
||||
require 'google/apis/appengine_v1alpha/classes.rb'
|
||||
require 'google/apis/appengine_v1alpha/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google App Engine Admin API
|
||||
#
|
||||
# The App Engine Admin API enables developers to provision and manage their App
|
||||
# Engine applications.
|
||||
#
|
||||
# @see https://cloud.google.com/appengine/docs/admin-api/
|
||||
module AppengineV1alpha
|
||||
VERSION = 'V1alpha'
|
||||
REVISION = '20170714'
|
||||
|
||||
# View and manage your applications deployed on Google App Engine
|
||||
AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,987 @@
|
|||
# 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 AppengineV1alpha
|
||||
|
||||
# An SSL certificate that a user has been authorized to administer. A user is
|
||||
# authorized to administer any certificate that applies to one of their
|
||||
# authorized domains.
|
||||
class AuthorizedCertificate
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# An SSL certificate obtained from a certificate authority.
|
||||
# Corresponds to the JSON property `certificateRawData`
|
||||
# @return [Google::Apis::AppengineV1alpha::CertificateRawData]
|
||||
attr_accessor :certificate_raw_data
|
||||
|
||||
# The user-specified display name of the certificate. This is not guaranteed to
|
||||
# be unique. Example: My Certificate.
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# Aggregate count of the domain mappings with this certificate mapped. This
|
||||
# count includes domain mappings on applications for which the user does not
|
||||
# have VIEWER permissions.Only returned by GET or LIST requests when
|
||||
# specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly
|
||||
# Corresponds to the JSON property `domainMappingsCount`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :domain_mappings_count
|
||||
|
||||
# Topmost applicable domains of this certificate. This certificate applies to
|
||||
# these domains and their subdomains. Example: example.com.@OutputOnly
|
||||
# Corresponds to the JSON property `domainNames`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :domain_names
|
||||
|
||||
# The time when this certificate expires. To update the renewal time on this
|
||||
# certificate, upload an SSL certificate with a different expiration time using
|
||||
# AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly
|
||||
# Corresponds to the JSON property `expireTime`
|
||||
# @return [String]
|
||||
attr_accessor :expire_time
|
||||
|
||||
# Relative name of the certificate. This is a unique value autogenerated on
|
||||
# AuthorizedCertificate resource creation. Example: 12345.@OutputOnly
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# A certificate managed by App Engine.
|
||||
# Corresponds to the JSON property `managedCertificate`
|
||||
# @return [Google::Apis::AppengineV1alpha::ManagedCertificate]
|
||||
attr_accessor :managed_certificate
|
||||
|
||||
# Full path to the AuthorizedCertificate resource in the API. Example: apps/
|
||||
# myapp/authorizedCertificates/12345.@OutputOnly
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The full paths to user visible Domain Mapping resources that have this
|
||||
# certificate mapped. Example: apps/myapp/domainMappings/example.com.This may
|
||||
# not represent the full list of mapped domain mappings if the user does not
|
||||
# have VIEWER permissions on all of the applications that have this certificate
|
||||
# mapped. See domain_mappings_count for a complete count.Only returned by GET or
|
||||
# LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@
|
||||
# OutputOnly
|
||||
# Corresponds to the JSON property `visibleDomainMappings`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :visible_domain_mappings
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@certificate_raw_data = args[:certificate_raw_data] if args.key?(:certificate_raw_data)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@domain_mappings_count = args[:domain_mappings_count] if args.key?(:domain_mappings_count)
|
||||
@domain_names = args[:domain_names] if args.key?(:domain_names)
|
||||
@expire_time = args[:expire_time] if args.key?(:expire_time)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@managed_certificate = args[:managed_certificate] if args.key?(:managed_certificate)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@visible_domain_mappings = args[:visible_domain_mappings] if args.key?(:visible_domain_mappings)
|
||||
end
|
||||
end
|
||||
|
||||
# A domain that a user has been authorized to administer. To authorize use of a
|
||||
# domain, verify ownership via Webmaster Central (https://www.google.com/
|
||||
# webmasters/verification/home).
|
||||
class AuthorizedDomain
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Fully qualified domain name of the domain authorized for use. Example: example.
|
||||
# com.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/
|
||||
# authorizedDomains/example.com.@OutputOnly
|
||||
# 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)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
# An SSL certificate obtained from a certificate authority.
|
||||
class CertificateRawData
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unencrypted PEM encoded RSA private key. This field is set once on certificate
|
||||
# creation and then encrypted. The key size must be 2048 bits or fewer. Must
|
||||
# include the header and footer. Example: <pre> -----BEGIN RSA PRIVATE KEY----- <
|
||||
# unencrypted_key_value> -----END RSA PRIVATE KEY----- </pre> @InputOnly
|
||||
# Corresponds to the JSON property `privateKey`
|
||||
# @return [String]
|
||||
attr_accessor :private_key
|
||||
|
||||
# PEM encoded x.509 public key certificate. This field is set once on
|
||||
# certificate creation. Must include the header and footer. Example: <pre> -----
|
||||
# BEGIN CERTIFICATE----- <certificate_value> -----END CERTIFICATE----- </pre>
|
||||
# Corresponds to the JSON property `publicCertificate`
|
||||
# @return [String]
|
||||
attr_accessor :public_certificate
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@private_key = args[:private_key] if args.key?(:private_key)
|
||||
@public_certificate = args[:public_certificate] if args.key?(:public_certificate)
|
||||
end
|
||||
end
|
||||
|
||||
# A domain serving an App Engine application.
|
||||
class DomainMapping
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Relative name of the domain serving the application. Example: example.com.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Full path to the DomainMapping resource in the API. Example: apps/myapp/
|
||||
# domainMapping/example.com.@OutputOnly
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The resource records required to configure this domain mapping. These records
|
||||
# must be added to the domain's DNS configuration in order to serve the
|
||||
# application via this domain mapping.@OutputOnly
|
||||
# Corresponds to the JSON property `resourceRecords`
|
||||
# @return [Array<Google::Apis::AppengineV1alpha::ResourceRecord>]
|
||||
attr_accessor :resource_records
|
||||
|
||||
# SSL configuration for a DomainMapping resource.
|
||||
# Corresponds to the JSON property `sslSettings`
|
||||
# @return [Google::Apis::AppengineV1alpha::SslSettings]
|
||||
attr_accessor :ssl_settings
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@resource_records = args[:resource_records] if args.key?(:resource_records)
|
||||
@ssl_settings = args[:ssl_settings] if args.key?(:ssl_settings)
|
||||
end
|
||||
end
|
||||
|
||||
# A generic empty message that you can re-use to avoid defining duplicated empty
|
||||
# messages in your APIs. A typical example is to use it as the request or the
|
||||
# response type of an API method. For instance:
|
||||
# service Foo `
|
||||
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
# `
|
||||
# The JSON representation for Empty is empty JSON object ``.
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for AuthorizedCertificates.ListAuthorizedCertificates.
|
||||
class ListAuthorizedCertificatesResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The SSL certificates the user is authorized to administer.
|
||||
# Corresponds to the JSON property `certificates`
|
||||
# @return [Array<Google::Apis::AppengineV1alpha::AuthorizedCertificate>]
|
||||
attr_accessor :certificates
|
||||
|
||||
# Continuation token for fetching the next page of results.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@certificates = args[:certificates] if args.key?(:certificates)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for AuthorizedDomains.ListAuthorizedDomains.
|
||||
class ListAuthorizedDomainsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The authorized domains belonging to the user.
|
||||
# Corresponds to the JSON property `domains`
|
||||
# @return [Array<Google::Apis::AppengineV1alpha::AuthorizedDomain>]
|
||||
attr_accessor :domains
|
||||
|
||||
# Continuation token for fetching the next page of results.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@domains = args[:domains] if args.key?(:domains)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for DomainMappings.ListDomainMappings.
|
||||
class ListDomainMappingsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The domain mappings for the application.
|
||||
# Corresponds to the JSON property `domainMappings`
|
||||
# @return [Array<Google::Apis::AppengineV1alpha::DomainMapping>]
|
||||
attr_accessor :domain_mappings
|
||||
|
||||
# Continuation token for fetching the next page of results.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@domain_mappings = args[:domain_mappings] if args.key?(:domain_mappings)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for Locations.ListLocations.
|
||||
class ListLocationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of locations that matches the specified filter in the request.
|
||||
# Corresponds to the JSON property `locations`
|
||||
# @return [Array<Google::Apis::AppengineV1alpha::Location>]
|
||||
attr_accessor :locations
|
||||
|
||||
# The standard List next-page token.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@locations = args[:locations] if args.key?(:locations)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for Operations.ListOperations.
|
||||
class ListOperationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The standard List next-page token.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# A list of operations that matches the specified filter in the request.
|
||||
# Corresponds to the JSON property `operations`
|
||||
# @return [Array<Google::Apis::AppengineV1alpha::Operation>]
|
||||
attr_accessor :operations
|
||||
|
||||
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)
|
||||
@operations = args[:operations] if args.key?(:operations)
|
||||
end
|
||||
end
|
||||
|
||||
# A resource that represents Google Cloud Platform location.
|
||||
class Location
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Cross-service attributes for the location. For example
|
||||
# `"cloud.googleapis.com/region": "us-east1"`
|
||||
# Corresponds to the JSON property `labels`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :labels
|
||||
|
||||
# The canonical id for this location. For example: "us-east1".
|
||||
# Corresponds to the JSON property `locationId`
|
||||
# @return [String]
|
||||
attr_accessor :location_id
|
||||
|
||||
# Service-specific metadata. For example the available capacity at the given
|
||||
# location.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# Resource name for the location, which may vary between implementations. For
|
||||
# example: "projects/example-project/locations/us-east1"
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@labels = args[:labels] if args.key?(:labels)
|
||||
@location_id = args[:location_id] if args.key?(:location_id)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata for the given google.cloud.location.Location.
|
||||
class LocationMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# App Engine Flexible Environment is available in the given location.@OutputOnly
|
||||
# Corresponds to the JSON property `flexibleEnvironmentAvailable`
|
||||
# @return [Boolean]
|
||||
attr_accessor :flexible_environment_available
|
||||
alias_method :flexible_environment_available?, :flexible_environment_available
|
||||
|
||||
# App Engine Standard Environment is available in the given location.@OutputOnly
|
||||
# Corresponds to the JSON property `standardEnvironmentAvailable`
|
||||
# @return [Boolean]
|
||||
attr_accessor :standard_environment_available
|
||||
alias_method :standard_environment_available?, :standard_environment_available
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@flexible_environment_available = args[:flexible_environment_available] if args.key?(:flexible_environment_available)
|
||||
@standard_environment_available = args[:standard_environment_available] if args.key?(:standard_environment_available)
|
||||
end
|
||||
end
|
||||
|
||||
# A certificate managed by App Engine.
|
||||
class ManagedCertificate
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Time at which the certificate was last renewed. The renewal process is fully
|
||||
# managed. Certificate renewal will automatically occur before the certificate
|
||||
# expires. Renewal errors can be tracked via ManagementStatus.@OutputOnly
|
||||
# Corresponds to the JSON property `lastRenewalTime`
|
||||
# @return [String]
|
||||
attr_accessor :last_renewal_time
|
||||
|
||||
# Status of certificate management. Refers to the most recent certificate
|
||||
# acquisition or renewal attempt.@OutputOnly
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@last_renewal_time = args[:last_renewal_time] if args.key?(:last_renewal_time)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
end
|
||||
end
|
||||
|
||||
# This resource represents a long-running operation that is the result of a
|
||||
# network API call.
|
||||
class Operation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# If the value is false, it means the operation is still in progress. If true,
|
||||
# the operation is completed, and either error or response is available.
|
||||
# Corresponds to the JSON property `done`
|
||||
# @return [Boolean]
|
||||
attr_accessor :done
|
||||
alias_method :done?, :done
|
||||
|
||||
# The Status type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by gRPC
|
||||
# (https://github.com/grpc). The error model is designed to be:
|
||||
# Simple to use and understand for most users
|
||||
# Flexible enough to meet unexpected needsOverviewThe 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 that can be used for common error
|
||||
# conditions.Language mappingThe 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 usesThe 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.
|
||||
# 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::AppengineV1alpha::Status]
|
||||
attr_accessor :error
|
||||
|
||||
# Service-specific metadata associated with the operation. It typically contains
|
||||
# progress information and common metadata such as create time. Some services
|
||||
# might not provide such metadata. Any method that returns a long-running
|
||||
# operation should document the metadata type, if any.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# The server-assigned name, which is only unique within the same service that
|
||||
# originally returns it. If you use the default HTTP mapping, the name should
|
||||
# have the format of operations/some/unique/name.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The normal response of the operation in case of success. If the original
|
||||
# method returns no data on success, such as Delete, the response is google.
|
||||
# protobuf.Empty. If the original method is standard Get/Create/Update, the
|
||||
# response should be the resource. For other methods, the response should have
|
||||
# the type XxxResponse, where Xxx is the original method name. For example, if
|
||||
# the original method name is TakeSnapshot(), the inferred response type is
|
||||
# TakeSnapshotResponse.
|
||||
# Corresponds to the JSON property `response`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :response
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@done = args[:done] if args.key?(:done)
|
||||
@error = args[:error] if args.key?(:error)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@response = args[:response] if args.key?(:response)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata for the given google.longrunning.Operation.
|
||||
class OperationMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Timestamp that this operation completed.@OutputOnly
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [String]
|
||||
attr_accessor :end_time
|
||||
|
||||
# Timestamp that this operation was created.@OutputOnly
|
||||
# Corresponds to the JSON property `insertTime`
|
||||
# @return [String]
|
||||
attr_accessor :insert_time
|
||||
|
||||
# API method that initiated this operation. Example: google.appengine.v1beta4.
|
||||
# Version.CreateVersion.@OutputOnly
|
||||
# Corresponds to the JSON property `method`
|
||||
# @return [String]
|
||||
attr_accessor :method_prop
|
||||
|
||||
# Type of this operation. Deprecated, use method field instead. Example: "
|
||||
# create_version".@OutputOnly
|
||||
# Corresponds to the JSON property `operationType`
|
||||
# @return [String]
|
||||
attr_accessor :operation_type
|
||||
|
||||
# Name of the resource that this operation is acting on. Example: apps/myapp/
|
||||
# modules/default.@OutputOnly
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# User who requested this operation.@OutputOnly
|
||||
# Corresponds to the JSON property `user`
|
||||
# @return [String]
|
||||
attr_accessor :user
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@insert_time = args[:insert_time] if args.key?(:insert_time)
|
||||
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
||||
@operation_type = args[:operation_type] if args.key?(:operation_type)
|
||||
@target = args[:target] if args.key?(:target)
|
||||
@user = args[:user] if args.key?(:user)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata for the given google.longrunning.Operation.
|
||||
class OperationMetadataExperimental
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Time that this operation completed.@OutputOnly
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [String]
|
||||
attr_accessor :end_time
|
||||
|
||||
# Time that this operation was created.@OutputOnly
|
||||
# Corresponds to the JSON property `insertTime`
|
||||
# @return [String]
|
||||
attr_accessor :insert_time
|
||||
|
||||
# API method that initiated this operation. Example: google.appengine.
|
||||
# experimental.CustomDomains.CreateCustomDomain.@OutputOnly
|
||||
# Corresponds to the JSON property `method`
|
||||
# @return [String]
|
||||
attr_accessor :method_prop
|
||||
|
||||
# Name of the resource that this operation is acting on. Example: apps/myapp/
|
||||
# customDomains/example.com.@OutputOnly
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# User who requested this operation.@OutputOnly
|
||||
# Corresponds to the JSON property `user`
|
||||
# @return [String]
|
||||
attr_accessor :user
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@insert_time = args[:insert_time] if args.key?(:insert_time)
|
||||
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
||||
@target = args[:target] if args.key?(:target)
|
||||
@user = args[:user] if args.key?(:user)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata for the given google.longrunning.Operation.
|
||||
class OperationMetadataV1
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Time that this operation completed.@OutputOnly
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [String]
|
||||
attr_accessor :end_time
|
||||
|
||||
# Ephemeral message that may change every time the operation is polled. @
|
||||
# OutputOnly
|
||||
# Corresponds to the JSON property `ephemeralMessage`
|
||||
# @return [String]
|
||||
attr_accessor :ephemeral_message
|
||||
|
||||
# Time that this operation was created.@OutputOnly
|
||||
# Corresponds to the JSON property `insertTime`
|
||||
# @return [String]
|
||||
attr_accessor :insert_time
|
||||
|
||||
# API method that initiated this operation. Example: google.appengine.v1.
|
||||
# Versions.CreateVersion.@OutputOnly
|
||||
# Corresponds to the JSON property `method`
|
||||
# @return [String]
|
||||
attr_accessor :method_prop
|
||||
|
||||
# Name of the resource that this operation is acting on. Example: apps/myapp/
|
||||
# services/default.@OutputOnly
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# User who requested this operation.@OutputOnly
|
||||
# Corresponds to the JSON property `user`
|
||||
# @return [String]
|
||||
attr_accessor :user
|
||||
|
||||
# Durable messages that persist on every operation poll. @OutputOnly
|
||||
# Corresponds to the JSON property `warning`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :warning
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@ephemeral_message = args[:ephemeral_message] if args.key?(:ephemeral_message)
|
||||
@insert_time = args[:insert_time] if args.key?(:insert_time)
|
||||
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
||||
@target = args[:target] if args.key?(:target)
|
||||
@user = args[:user] if args.key?(:user)
|
||||
@warning = args[:warning] if args.key?(:warning)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata for the given google.longrunning.Operation.
|
||||
class OperationMetadataV1Alpha
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Time that this operation completed.@OutputOnly
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [String]
|
||||
attr_accessor :end_time
|
||||
|
||||
# Ephemeral message that may change every time the operation is polled. @
|
||||
# OutputOnly
|
||||
# Corresponds to the JSON property `ephemeralMessage`
|
||||
# @return [String]
|
||||
attr_accessor :ephemeral_message
|
||||
|
||||
# Time that this operation was created.@OutputOnly
|
||||
# Corresponds to the JSON property `insertTime`
|
||||
# @return [String]
|
||||
attr_accessor :insert_time
|
||||
|
||||
# API method that initiated this operation. Example: google.appengine.v1alpha.
|
||||
# Versions.CreateVersion.@OutputOnly
|
||||
# Corresponds to the JSON property `method`
|
||||
# @return [String]
|
||||
attr_accessor :method_prop
|
||||
|
||||
# Name of the resource that this operation is acting on. Example: apps/myapp/
|
||||
# services/default.@OutputOnly
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# User who requested this operation.@OutputOnly
|
||||
# Corresponds to the JSON property `user`
|
||||
# @return [String]
|
||||
attr_accessor :user
|
||||
|
||||
# Durable messages that persist on every operation poll. @OutputOnly
|
||||
# Corresponds to the JSON property `warning`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :warning
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@ephemeral_message = args[:ephemeral_message] if args.key?(:ephemeral_message)
|
||||
@insert_time = args[:insert_time] if args.key?(:insert_time)
|
||||
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
||||
@target = args[:target] if args.key?(:target)
|
||||
@user = args[:user] if args.key?(:user)
|
||||
@warning = args[:warning] if args.key?(:warning)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata for the given google.longrunning.Operation.
|
||||
class OperationMetadataV1Beta
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Time that this operation completed.@OutputOnly
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [String]
|
||||
attr_accessor :end_time
|
||||
|
||||
# Ephemeral message that may change every time the operation is polled. @
|
||||
# OutputOnly
|
||||
# Corresponds to the JSON property `ephemeralMessage`
|
||||
# @return [String]
|
||||
attr_accessor :ephemeral_message
|
||||
|
||||
# Time that this operation was created.@OutputOnly
|
||||
# Corresponds to the JSON property `insertTime`
|
||||
# @return [String]
|
||||
attr_accessor :insert_time
|
||||
|
||||
# API method that initiated this operation. Example: google.appengine.v1beta.
|
||||
# Versions.CreateVersion.@OutputOnly
|
||||
# Corresponds to the JSON property `method`
|
||||
# @return [String]
|
||||
attr_accessor :method_prop
|
||||
|
||||
# Name of the resource that this operation is acting on. Example: apps/myapp/
|
||||
# services/default.@OutputOnly
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# User who requested this operation.@OutputOnly
|
||||
# Corresponds to the JSON property `user`
|
||||
# @return [String]
|
||||
attr_accessor :user
|
||||
|
||||
# Durable messages that persist on every operation poll. @OutputOnly
|
||||
# Corresponds to the JSON property `warning`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :warning
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@ephemeral_message = args[:ephemeral_message] if args.key?(:ephemeral_message)
|
||||
@insert_time = args[:insert_time] if args.key?(:insert_time)
|
||||
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
||||
@target = args[:target] if args.key?(:target)
|
||||
@user = args[:user] if args.key?(:user)
|
||||
@warning = args[:warning] if args.key?(:warning)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata for the given google.longrunning.Operation.
|
||||
class OperationMetadataV1Beta5
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Timestamp that this operation completed.@OutputOnly
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [String]
|
||||
attr_accessor :end_time
|
||||
|
||||
# Timestamp that this operation was created.@OutputOnly
|
||||
# Corresponds to the JSON property `insertTime`
|
||||
# @return [String]
|
||||
attr_accessor :insert_time
|
||||
|
||||
# API method name that initiated this operation. Example: google.appengine.
|
||||
# v1beta5.Version.CreateVersion.@OutputOnly
|
||||
# Corresponds to the JSON property `method`
|
||||
# @return [String]
|
||||
attr_accessor :method_prop
|
||||
|
||||
# Name of the resource that this operation is acting on. Example: apps/myapp/
|
||||
# services/default.@OutputOnly
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# User who requested this operation.@OutputOnly
|
||||
# Corresponds to the JSON property `user`
|
||||
# @return [String]
|
||||
attr_accessor :user
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@insert_time = args[:insert_time] if args.key?(:insert_time)
|
||||
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
||||
@target = args[:target] if args.key?(:target)
|
||||
@user = args[:user] if args.key?(:user)
|
||||
end
|
||||
end
|
||||
|
||||
# A DNS resource record.
|
||||
class ResourceRecord
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Relative name of the object affected by this record. Only applicable for CNAME
|
||||
# records. Example: 'www'.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# Data for this record. Values vary by record type, as defined in RFC 1035 (
|
||||
# section 5) and RFC 1034 (section 3.6.1).
|
||||
# Corresponds to the JSON property `rrdata`
|
||||
# @return [String]
|
||||
attr_accessor :rrdata
|
||||
|
||||
# Resource record type. Example: AAAA.
|
||||
# Corresponds to the JSON property `type`
|
||||
# @return [String]
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@rrdata = args[:rrdata] if args.key?(:rrdata)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
end
|
||||
end
|
||||
|
||||
# SSL configuration for a DomainMapping resource.
|
||||
class SslSettings
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ID of the AuthorizedCertificate resource configuring SSL for the application.
|
||||
# Clearing this field will remove SSL support.By default, a managed certificate
|
||||
# is automatically created for every domain mapping. To omit SSL support or to
|
||||
# configure SSL manually, specify no_managed_certificate on a CREATE or UPDATE
|
||||
# request. You must be authorized to administer the AuthorizedCertificate
|
||||
# resource to manually map it to a DomainMapping resource. Example: 12345.
|
||||
# Corresponds to the JSON property `certificateId`
|
||||
# @return [String]
|
||||
attr_accessor :certificate_id
|
||||
|
||||
# Whether the mapped certificate is an App Engine managed certificate. Managed
|
||||
# certificates are created by default with a domain mapping. To opt out, specify
|
||||
# no_managed_certificate on a CREATE or UPDATE request.@OutputOnly
|
||||
# Corresponds to the JSON property `isManagedCertificate`
|
||||
# @return [Boolean]
|
||||
attr_accessor :is_managed_certificate
|
||||
alias_method :is_managed_certificate?, :is_managed_certificate
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@certificate_id = args[:certificate_id] if args.key?(:certificate_id)
|
||||
@is_managed_certificate = args[:is_managed_certificate] if args.key?(:is_managed_certificate)
|
||||
end
|
||||
end
|
||||
|
||||
# The Status type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by gRPC
|
||||
# (https://github.com/grpc). The error model is designed to be:
|
||||
# Simple to use and understand for most users
|
||||
# Flexible enough to meet unexpected needsOverviewThe 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 that can be used for common error
|
||||
# conditions.Language mappingThe 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 usesThe 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.
|
||||
# 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.
|
||||
class Status
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The status code, which should be an enum value of google.rpc.Code.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :code
|
||||
|
||||
# A list of messages that carry the error details. There is a common set of
|
||||
# message types for APIs to use.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Array<Hash<String,Object>>]
|
||||
attr_accessor :details
|
||||
|
||||
# A developer-facing error message, which should be in English. Any user-facing
|
||||
# error message should be localized and sent in the google.rpc.Status.details
|
||||
# field, or localized by the client.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,397 @@
|
|||
# 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 AppengineV1alpha
|
||||
|
||||
class AuthorizedCertificate
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuthorizedDomain
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CertificateRawData
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DomainMapping
|
||||
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 ListAuthorizedCertificatesResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListAuthorizedDomainsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListDomainMappingsResponse
|
||||
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 ListOperationsResponse
|
||||
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 LocationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ManagedCertificate
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataExperimental
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Alpha
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta5
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ResourceRecord
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SslSettings
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuthorizedCertificate
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :certificate_raw_data, as: 'certificateRawData', class: Google::Apis::AppengineV1alpha::CertificateRawData, decorator: Google::Apis::AppengineV1alpha::CertificateRawData::Representation
|
||||
|
||||
property :display_name, as: 'displayName'
|
||||
property :domain_mappings_count, as: 'domainMappingsCount'
|
||||
collection :domain_names, as: 'domainNames'
|
||||
property :expire_time, as: 'expireTime'
|
||||
property :id, as: 'id'
|
||||
property :managed_certificate, as: 'managedCertificate', class: Google::Apis::AppengineV1alpha::ManagedCertificate, decorator: Google::Apis::AppengineV1alpha::ManagedCertificate::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
collection :visible_domain_mappings, as: 'visibleDomainMappings'
|
||||
end
|
||||
end
|
||||
|
||||
class AuthorizedDomain
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class CertificateRawData
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :private_key, as: 'privateKey'
|
||||
property :public_certificate, as: 'publicCertificate'
|
||||
end
|
||||
end
|
||||
|
||||
class DomainMapping
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :name, as: 'name'
|
||||
collection :resource_records, as: 'resourceRecords', class: Google::Apis::AppengineV1alpha::ResourceRecord, decorator: Google::Apis::AppengineV1alpha::ResourceRecord::Representation
|
||||
|
||||
property :ssl_settings, as: 'sslSettings', class: Google::Apis::AppengineV1alpha::SslSettings, decorator: Google::Apis::AppengineV1alpha::SslSettings::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Empty
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class ListAuthorizedCertificatesResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :certificates, as: 'certificates', class: Google::Apis::AppengineV1alpha::AuthorizedCertificate, decorator: Google::Apis::AppengineV1alpha::AuthorizedCertificate::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListAuthorizedDomainsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :domains, as: 'domains', class: Google::Apis::AppengineV1alpha::AuthorizedDomain, decorator: Google::Apis::AppengineV1alpha::AuthorizedDomain::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListDomainMappingsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :domain_mappings, as: 'domainMappings', class: Google::Apis::AppengineV1alpha::DomainMapping, decorator: Google::Apis::AppengineV1alpha::DomainMapping::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListLocationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :locations, as: 'locations', class: Google::Apis::AppengineV1alpha::Location, decorator: Google::Apis::AppengineV1alpha::Location::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :operations, as: 'operations', class: Google::Apis::AppengineV1alpha::Operation, decorator: Google::Apis::AppengineV1alpha::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Location
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :labels, as: 'labels'
|
||||
property :location_id, as: 'locationId'
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class LocationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :flexible_environment_available, as: 'flexibleEnvironmentAvailable'
|
||||
property :standard_environment_available, as: 'standardEnvironmentAvailable'
|
||||
end
|
||||
end
|
||||
|
||||
class ManagedCertificate
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :last_renewal_time, as: 'lastRenewalTime'
|
||||
property :status, as: 'status'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
property :error, as: 'error', class: Google::Apis::AppengineV1alpha::Status, decorator: Google::Apis::AppengineV1alpha::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataExperimental
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Alpha
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta5
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class ResourceRecord
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :rrdata, as: 'rrdata'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
end
|
||||
|
||||
class SslSettings
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :certificate_id, as: 'certificateId'
|
||||
property :is_managed_certificate, as: 'isManagedCertificate'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,631 @@
|
|||
# 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 AppengineV1alpha
|
||||
# Google App Engine Admin API
|
||||
#
|
||||
# The App Engine Admin API enables developers to provision and manage their App
|
||||
# Engine applications.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/appengine_v1alpha'
|
||||
#
|
||||
# Appengine = Google::Apis::AppengineV1alpha # Alias the module
|
||||
# service = Appengine::AppengineService.new
|
||||
#
|
||||
# @see https://cloud.google.com/appengine/docs/admin-api/
|
||||
class AppengineService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://appengine.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Uploads the specified SSL certificate.
|
||||
# @param [String] apps_id
|
||||
# Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
|
||||
# @param [Google::Apis::AppengineV1alpha::AuthorizedCertificate] authorized_certificate_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::AppengineV1alpha::AuthorizedCertificate] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::AuthorizedCertificate]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_authorized_certificate(apps_id, authorized_certificate_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1alpha/apps/{appsId}/authorizedCertificates', options)
|
||||
command.request_representation = Google::Apis::AppengineV1alpha::AuthorizedCertificate::Representation
|
||||
command.request_object = authorized_certificate_object
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::AuthorizedCertificate::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::AuthorizedCertificate
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes the specified SSL certificate.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to delete. Example: apps/myapp/
|
||||
# authorizedCertificates/12345.
|
||||
# @param [String] authorized_certificates_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1alpha::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::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_app_authorized_certificate(apps_id, authorized_certificates_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::Empty::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::Empty
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['authorizedCertificatesId'] = authorized_certificates_id unless authorized_certificates_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the specified SSL certificate.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/
|
||||
# authorizedCertificates/12345.
|
||||
# @param [String] authorized_certificates_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] view
|
||||
# Controls the set of fields returned in the GET 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::AppengineV1alpha::AuthorizedCertificate] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::AuthorizedCertificate]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_authorized_certificate(apps_id, authorized_certificates_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::AuthorizedCertificate::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::AuthorizedCertificate
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['authorizedCertificatesId'] = authorized_certificates_id unless authorized_certificates_id.nil?
|
||||
command.query['view'] = view unless view.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists all SSL certificates the user is authorized to administer.
|
||||
# @param [String] apps_id
|
||||
# Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching the next page of results.
|
||||
# @param [String] view
|
||||
# Controls the set of fields returned in the LIST 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::AppengineV1alpha::ListAuthorizedCertificatesResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::ListAuthorizedCertificatesResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_authorized_certificates(apps_id, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/authorizedCertificates', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::ListAuthorizedCertificatesResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::ListAuthorizedCertificatesResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['view'] = view unless view.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the specified SSL certificate. To renew a certificate and maintain its
|
||||
# existing domain mappings, update certificate_data with a new certificate. The
|
||||
# new certificate must be applicable to the same domains as the original
|
||||
# certificate. The certificate display_name may also be updated.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to update. Example: apps/myapp/
|
||||
# authorizedCertificates/12345.
|
||||
# @param [String] authorized_certificates_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1alpha::AuthorizedCertificate] authorized_certificate_object
|
||||
# @param [String] update_mask
|
||||
# Standard field mask for the set of fields to be updated. Updates are only
|
||||
# supported on the certificate_raw_data and display_name fields.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1alpha::AuthorizedCertificate] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::AuthorizedCertificate]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_authorized_certificate(apps_id, authorized_certificates_id, authorized_certificate_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}', options)
|
||||
command.request_representation = Google::Apis::AppengineV1alpha::AuthorizedCertificate::Representation
|
||||
command.request_object = authorized_certificate_object
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::AuthorizedCertificate::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::AuthorizedCertificate
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['authorizedCertificatesId'] = authorized_certificates_id unless authorized_certificates_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
|
||||
|
||||
# Lists all domains the user is authorized to administer.
|
||||
# @param [String] apps_id
|
||||
# Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1alpha::ListAuthorizedDomainsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::ListAuthorizedDomainsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_authorized_domains(apps_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/authorizedDomains', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::ListAuthorizedDomainsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::ListAuthorizedDomainsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.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
|
||||
|
||||
# Maps a domain to an application. A user must be authorized to administer a
|
||||
# domain in order to map it to an application. For a list of available
|
||||
# authorized domains, see AuthorizedDomains.ListAuthorizedDomains.
|
||||
# @param [String] apps_id
|
||||
# Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
|
||||
# @param [Google::Apis::AppengineV1alpha::DomainMapping] domain_mapping_object
|
||||
# @param [Boolean] no_managed_certificate
|
||||
# Whether a managed certificate should be provided by App Engine. If true, a
|
||||
# certificate ID must be manaually set in the DomainMapping resource to
|
||||
# configure SSL for this domain. If false, a managed certificate will be
|
||||
# provisioned and a certificate ID will be automatically populated.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1alpha::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::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_app_domain_mapping(apps_id, domain_mapping_object = nil, no_managed_certificate: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1alpha/apps/{appsId}/domainMappings', options)
|
||||
command.request_representation = Google::Apis::AppengineV1alpha::DomainMapping::Representation
|
||||
command.request_object = domain_mapping_object
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['noManagedCertificate'] = no_managed_certificate unless no_managed_certificate.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes the specified domain mapping. A user must be authorized to administer
|
||||
# the associated domain in order to delete a DomainMapping resource.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to delete. Example: apps/myapp/
|
||||
# domainMappings/example.com.
|
||||
# @param [String] domain_mappings_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1alpha::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::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_app_domain_mapping(apps_id, domain_mappings_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['domainMappingsId'] = domain_mappings_id unless domain_mappings_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the specified domain mapping.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/
|
||||
# domainMappings/example.com.
|
||||
# @param [String] domain_mappings_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1alpha::DomainMapping] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::DomainMapping]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_domain_mapping(apps_id, domain_mappings_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::DomainMapping::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::DomainMapping
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['domainMappingsId'] = domain_mappings_id unless domain_mappings_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 the domain mappings on an application.
|
||||
# @param [String] apps_id
|
||||
# Part of `parent`. Name of the parent Application resource. Example: apps/myapp.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1alpha::ListDomainMappingsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::ListDomainMappingsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_domain_mappings(apps_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/domainMappings', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::ListDomainMappingsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::ListDomainMappingsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the specified domain mapping. To map an SSL certificate to a domain
|
||||
# mapping, update certificate_id to point to an AuthorizedCertificate resource.
|
||||
# A user must be authorized to administer the associated domain in order to
|
||||
# update a DomainMapping resource.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to update. Example: apps/myapp/
|
||||
# domainMappings/example.com.
|
||||
# @param [String] domain_mappings_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1alpha::DomainMapping] domain_mapping_object
|
||||
# @param [Boolean] no_managed_certificate
|
||||
# Whether a managed certificate should be provided by App Engine. If true, a
|
||||
# certificate ID must be manually set in the DomainMapping resource to configure
|
||||
# SSL for this domain. If false, a managed certificate will be provisioned and a
|
||||
# certificate ID will be automatically populated. Only applicable if
|
||||
# ssl_settings.certificate_id is specified in the update mask.
|
||||
# @param [String] update_mask
|
||||
# Standard field mask for the set of fields to be updated.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1alpha::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::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_app_domain_mapping(apps_id, domain_mappings_id, domain_mapping_object = nil, no_managed_certificate: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}', options)
|
||||
command.request_representation = Google::Apis::AppengineV1alpha::DomainMapping::Representation
|
||||
command.request_object = domain_mapping_object
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['domainMappingsId'] = domain_mappings_id unless domain_mappings_id.nil?
|
||||
command.query['noManagedCertificate'] = no_managed_certificate unless no_managed_certificate.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
|
||||
|
||||
# Get information about a location.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Resource name for the location.
|
||||
# @param [String] locations_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1alpha::Location] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::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_app_location(apps_id, locations_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/locations/{locationsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::Location::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::Location
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['locationsId'] = locations_id unless locations_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 information about the supported locations for this service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The resource that owns the locations collection, if applicable.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1alpha::ListLocationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::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_app_locations(apps_id, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/locations', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::ListLocationsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::ListLocationsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the latest state of a long-running operation. Clients can use this method
|
||||
# to poll the operation result at intervals as recommended by the API service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The name of the operation resource.
|
||||
# @param [String] operations_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1alpha::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::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_app_operation(apps_id, operations_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/operations/{operationsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['operationsId'] = operations_id unless operations_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 operations that match the specified filter in the request. If the server
|
||||
# doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
|
||||
# allows API services to override the binding to use different resource name
|
||||
# schemes, such as users/*/operations. To override the binding, API services can
|
||||
# add a binding such as "/v1/`name=users/*`/operations" to their service
|
||||
# configuration. For backwards compatibility, the default name includes the
|
||||
# operations collection id, however overriding users must ensure the name
|
||||
# binding is the parent resource, without the operations collection id.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The name of the operation's parent resource.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1alpha::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1alpha::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_app_operations(apps_id, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1alpha/apps/{appsId}/operations', options)
|
||||
command.response_representation = Google::Apis::AppengineV1alpha::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1alpha::ListOperationsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,41 @@
|
|||
# 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/appengine_v1beta/service.rb'
|
||||
require 'google/apis/appengine_v1beta/classes.rb'
|
||||
require 'google/apis/appengine_v1beta/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google App Engine Admin API
|
||||
#
|
||||
# The App Engine Admin API enables developers to provision and manage their App
|
||||
# Engine applications.
|
||||
#
|
||||
# @see https://cloud.google.com/appengine/docs/admin-api/
|
||||
module AppengineV1beta
|
||||
VERSION = 'V1beta'
|
||||
REVISION = '20170818'
|
||||
|
||||
# View and manage your applications deployed on Google App Engine
|
||||
AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,41 @@
|
|||
# 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/appengine_v1beta4/service.rb'
|
||||
require 'google/apis/appengine_v1beta4/classes.rb'
|
||||
require 'google/apis/appengine_v1beta4/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google App Engine Admin API
|
||||
#
|
||||
# The App Engine Admin API enables developers to provision and manage their App
|
||||
# Engine applications.
|
||||
#
|
||||
# @see https://cloud.google.com/appengine/docs/admin-api/
|
||||
module AppengineV1beta4
|
||||
VERSION = 'V1beta4'
|
||||
REVISION = '20170714'
|
||||
|
||||
# View and manage your applications deployed on Google App Engine
|
||||
AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,824 @@
|
|||
# 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 AppengineV1beta4
|
||||
|
||||
class ApiConfigHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ApiEndpointHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Application
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AutomaticScaling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BasicScaling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ContainerInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CpuUtilization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DebugInstanceRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Deployment
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DiskUtilization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ErrorHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FileInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class HealthCheck
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class IdentityAwareProxy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Instance
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Library
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListInstancesResponse
|
||||
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 ListModulesResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListVersionsResponse
|
||||
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 LocationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ManualScaling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Module
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Network
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NetworkUtilization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataExperimental
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Alpha
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta5
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class RequestUtilization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Resources
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ScriptHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SourceReference
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class StaticDirectoryHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class StaticFilesHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TrafficSplit
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UrlDispatchRule
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UrlMap
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Version
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Volume
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ApiConfigHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auth_fail_action, as: 'authFailAction'
|
||||
property :login, as: 'login'
|
||||
property :script, as: 'script'
|
||||
property :security_level, as: 'securityLevel'
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
|
||||
class ApiEndpointHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :script_path, as: 'scriptPath'
|
||||
end
|
||||
end
|
||||
|
||||
class Application
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auth_domain, as: 'authDomain'
|
||||
property :code_bucket, as: 'codeBucket'
|
||||
property :default_bucket, as: 'defaultBucket'
|
||||
property :default_cookie_expiration, as: 'defaultCookieExpiration'
|
||||
property :default_hostname, as: 'defaultHostname'
|
||||
collection :dispatch_rules, as: 'dispatchRules', class: Google::Apis::AppengineV1beta4::UrlDispatchRule, decorator: Google::Apis::AppengineV1beta4::UrlDispatchRule::Representation
|
||||
|
||||
property :iap, as: 'iap', class: Google::Apis::AppengineV1beta4::IdentityAwareProxy, decorator: Google::Apis::AppengineV1beta4::IdentityAwareProxy::Representation
|
||||
|
||||
property :id, as: 'id'
|
||||
property :location, as: 'location'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class AutomaticScaling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cool_down_period, as: 'coolDownPeriod'
|
||||
property :cpu_utilization, as: 'cpuUtilization', class: Google::Apis::AppengineV1beta4::CpuUtilization, decorator: Google::Apis::AppengineV1beta4::CpuUtilization::Representation
|
||||
|
||||
property :disk_utilization, as: 'diskUtilization', class: Google::Apis::AppengineV1beta4::DiskUtilization, decorator: Google::Apis::AppengineV1beta4::DiskUtilization::Representation
|
||||
|
||||
property :max_concurrent_requests, as: 'maxConcurrentRequests'
|
||||
property :max_idle_instances, as: 'maxIdleInstances'
|
||||
property :max_pending_latency, as: 'maxPendingLatency'
|
||||
property :max_total_instances, as: 'maxTotalInstances'
|
||||
property :min_idle_instances, as: 'minIdleInstances'
|
||||
property :min_pending_latency, as: 'minPendingLatency'
|
||||
property :min_total_instances, as: 'minTotalInstances'
|
||||
property :network_utilization, as: 'networkUtilization', class: Google::Apis::AppengineV1beta4::NetworkUtilization, decorator: Google::Apis::AppengineV1beta4::NetworkUtilization::Representation
|
||||
|
||||
property :request_utilization, as: 'requestUtilization', class: Google::Apis::AppengineV1beta4::RequestUtilization, decorator: Google::Apis::AppengineV1beta4::RequestUtilization::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class BasicScaling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :idle_timeout, as: 'idleTimeout'
|
||||
property :max_instances, as: 'maxInstances'
|
||||
end
|
||||
end
|
||||
|
||||
class ContainerInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :image, as: 'image'
|
||||
end
|
||||
end
|
||||
|
||||
class CpuUtilization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :aggregation_window_length, as: 'aggregationWindowLength'
|
||||
property :target_utilization, as: 'targetUtilization'
|
||||
end
|
||||
end
|
||||
|
||||
class DebugInstanceRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :ssh_key, as: 'sshKey'
|
||||
end
|
||||
end
|
||||
|
||||
class Deployment
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :container, as: 'container', class: Google::Apis::AppengineV1beta4::ContainerInfo, decorator: Google::Apis::AppengineV1beta4::ContainerInfo::Representation
|
||||
|
||||
hash :files, as: 'files', class: Google::Apis::AppengineV1beta4::FileInfo, decorator: Google::Apis::AppengineV1beta4::FileInfo::Representation
|
||||
|
||||
collection :source_references, as: 'sourceReferences', class: Google::Apis::AppengineV1beta4::SourceReference, decorator: Google::Apis::AppengineV1beta4::SourceReference::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class DiskUtilization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :target_read_bytes_per_sec, as: 'targetReadBytesPerSec'
|
||||
property :target_read_ops_per_sec, as: 'targetReadOpsPerSec'
|
||||
property :target_write_bytes_per_sec, as: 'targetWriteBytesPerSec'
|
||||
property :target_write_ops_per_sec, as: 'targetWriteOpsPerSec'
|
||||
end
|
||||
end
|
||||
|
||||
class ErrorHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :error_code, as: 'errorCode'
|
||||
property :mime_type, as: 'mimeType'
|
||||
property :static_file, as: 'staticFile'
|
||||
end
|
||||
end
|
||||
|
||||
class FileInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :mime_type, as: 'mimeType'
|
||||
property :sha1_sum, as: 'sha1Sum'
|
||||
property :source_url, as: 'sourceUrl'
|
||||
end
|
||||
end
|
||||
|
||||
class HealthCheck
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :check_interval, as: 'checkInterval'
|
||||
property :disable_health_check, as: 'disableHealthCheck'
|
||||
property :healthy_threshold, as: 'healthyThreshold'
|
||||
property :host, as: 'host'
|
||||
property :restart_threshold, as: 'restartThreshold'
|
||||
property :timeout, as: 'timeout'
|
||||
property :unhealthy_threshold, as: 'unhealthyThreshold'
|
||||
end
|
||||
end
|
||||
|
||||
class IdentityAwareProxy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :enabled, as: 'enabled'
|
||||
property :oauth2_client_id, as: 'oauth2ClientId'
|
||||
property :oauth2_client_secret, as: 'oauth2ClientSecret'
|
||||
property :oauth2_client_secret_sha256, as: 'oauth2ClientSecretSha256'
|
||||
end
|
||||
end
|
||||
|
||||
class Instance
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :app_engine_release, as: 'appEngineRelease'
|
||||
property :availability, as: 'availability'
|
||||
property :average_latency, as: 'averageLatency'
|
||||
property :errors, as: 'errors'
|
||||
property :id, as: 'id'
|
||||
property :memory_usage, :numeric_string => true, as: 'memoryUsage'
|
||||
property :name, as: 'name'
|
||||
property :qps, as: 'qps'
|
||||
property :requests, as: 'requests'
|
||||
property :start_timestamp, as: 'startTimestamp'
|
||||
property :vm_id, as: 'vmId'
|
||||
property :vm_ip, as: 'vmIp'
|
||||
property :vm_name, as: 'vmName'
|
||||
property :vm_status, as: 'vmStatus'
|
||||
property :vm_unlocked, as: 'vmUnlocked'
|
||||
property :vm_zone_name, as: 'vmZoneName'
|
||||
end
|
||||
end
|
||||
|
||||
class Library
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class ListInstancesResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :instances, as: 'instances', class: Google::Apis::AppengineV1beta4::Instance, decorator: Google::Apis::AppengineV1beta4::Instance::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListLocationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :locations, as: 'locations', class: Google::Apis::AppengineV1beta4::Location, decorator: Google::Apis::AppengineV1beta4::Location::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListModulesResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :modules, as: 'modules', class: Google::Apis::AppengineV1beta4::Module, decorator: Google::Apis::AppengineV1beta4::Module::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :operations, as: 'operations', class: Google::Apis::AppengineV1beta4::Operation, decorator: Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ListVersionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :versions, as: 'versions', class: Google::Apis::AppengineV1beta4::Version, decorator: Google::Apis::AppengineV1beta4::Version::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Location
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :labels, as: 'labels'
|
||||
property :location_id, as: 'locationId'
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class LocationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :flexible_environment_available, as: 'flexibleEnvironmentAvailable'
|
||||
property :standard_environment_available, as: 'standardEnvironmentAvailable'
|
||||
end
|
||||
end
|
||||
|
||||
class ManualScaling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :instances, as: 'instances'
|
||||
end
|
||||
end
|
||||
|
||||
class Module
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :name, as: 'name'
|
||||
property :split, as: 'split', class: Google::Apis::AppengineV1beta4::TrafficSplit, decorator: Google::Apis::AppengineV1beta4::TrafficSplit::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Network
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :forwarded_ports, as: 'forwardedPorts'
|
||||
property :instance_tag, as: 'instanceTag'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class NetworkUtilization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :target_received_bytes_per_sec, as: 'targetReceivedBytesPerSec'
|
||||
property :target_received_packets_per_sec, as: 'targetReceivedPacketsPerSec'
|
||||
property :target_sent_bytes_per_sec, as: 'targetSentBytesPerSec'
|
||||
property :target_sent_packets_per_sec, as: 'targetSentPacketsPerSec'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
property :error, as: 'error', class: Google::Apis::AppengineV1beta4::Status, decorator: Google::Apis::AppengineV1beta4::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataExperimental
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Alpha
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta5
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class RequestUtilization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :target_concurrent_requests, as: 'targetConcurrentRequests'
|
||||
property :target_request_count_per_sec, as: 'targetRequestCountPerSec'
|
||||
end
|
||||
end
|
||||
|
||||
class Resources
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cpu, as: 'cpu'
|
||||
property :disk_gb, as: 'diskGb'
|
||||
property :memory_gb, as: 'memoryGb'
|
||||
collection :volumes, as: 'volumes', class: Google::Apis::AppengineV1beta4::Volume, decorator: Google::Apis::AppengineV1beta4::Volume::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ScriptHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :script_path, as: 'scriptPath'
|
||||
end
|
||||
end
|
||||
|
||||
class SourceReference
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :repository, as: 'repository'
|
||||
property :revision_id, as: 'revisionId'
|
||||
end
|
||||
end
|
||||
|
||||
class StaticDirectoryHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :application_readable, as: 'applicationReadable'
|
||||
property :directory, as: 'directory'
|
||||
property :expiration, as: 'expiration'
|
||||
hash :http_headers, as: 'httpHeaders'
|
||||
property :mime_type, as: 'mimeType'
|
||||
property :require_matching_file, as: 'requireMatchingFile'
|
||||
end
|
||||
end
|
||||
|
||||
class StaticFilesHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :application_readable, as: 'applicationReadable'
|
||||
property :expiration, as: 'expiration'
|
||||
hash :http_headers, as: 'httpHeaders'
|
||||
property :mime_type, as: 'mimeType'
|
||||
property :path, as: 'path'
|
||||
property :require_matching_file, as: 'requireMatchingFile'
|
||||
property :upload_path_regex, as: 'uploadPathRegex'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
|
||||
class TrafficSplit
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :allocations, as: 'allocations'
|
||||
property :shard_by, as: 'shardBy'
|
||||
end
|
||||
end
|
||||
|
||||
class UrlDispatchRule
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :domain, as: 'domain'
|
||||
property :module, as: 'module'
|
||||
property :path, as: 'path'
|
||||
end
|
||||
end
|
||||
|
||||
class UrlMap
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :api_endpoint, as: 'apiEndpoint', class: Google::Apis::AppengineV1beta4::ApiEndpointHandler, decorator: Google::Apis::AppengineV1beta4::ApiEndpointHandler::Representation
|
||||
|
||||
property :auth_fail_action, as: 'authFailAction'
|
||||
property :login, as: 'login'
|
||||
property :redirect_http_response_code, as: 'redirectHttpResponseCode'
|
||||
property :script, as: 'script', class: Google::Apis::AppengineV1beta4::ScriptHandler, decorator: Google::Apis::AppengineV1beta4::ScriptHandler::Representation
|
||||
|
||||
property :security_level, as: 'securityLevel'
|
||||
property :static_directory, as: 'staticDirectory', class: Google::Apis::AppengineV1beta4::StaticDirectoryHandler, decorator: Google::Apis::AppengineV1beta4::StaticDirectoryHandler::Representation
|
||||
|
||||
property :static_files, as: 'staticFiles', class: Google::Apis::AppengineV1beta4::StaticFilesHandler, decorator: Google::Apis::AppengineV1beta4::StaticFilesHandler::Representation
|
||||
|
||||
property :url_regex, as: 'urlRegex'
|
||||
end
|
||||
end
|
||||
|
||||
class Version
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :api_config, as: 'apiConfig', class: Google::Apis::AppengineV1beta4::ApiConfigHandler, decorator: Google::Apis::AppengineV1beta4::ApiConfigHandler::Representation
|
||||
|
||||
property :automatic_scaling, as: 'automaticScaling', class: Google::Apis::AppengineV1beta4::AutomaticScaling, decorator: Google::Apis::AppengineV1beta4::AutomaticScaling::Representation
|
||||
|
||||
property :basic_scaling, as: 'basicScaling', class: Google::Apis::AppengineV1beta4::BasicScaling, decorator: Google::Apis::AppengineV1beta4::BasicScaling::Representation
|
||||
|
||||
hash :beta_settings, as: 'betaSettings'
|
||||
property :creation_time, as: 'creationTime'
|
||||
property :default_expiration, as: 'defaultExpiration'
|
||||
property :deployer, as: 'deployer'
|
||||
property :deployment, as: 'deployment', class: Google::Apis::AppengineV1beta4::Deployment, decorator: Google::Apis::AppengineV1beta4::Deployment::Representation
|
||||
|
||||
property :env, as: 'env'
|
||||
hash :env_variables, as: 'envVariables'
|
||||
collection :error_handlers, as: 'errorHandlers', class: Google::Apis::AppengineV1beta4::ErrorHandler, decorator: Google::Apis::AppengineV1beta4::ErrorHandler::Representation
|
||||
|
||||
collection :handlers, as: 'handlers', class: Google::Apis::AppengineV1beta4::UrlMap, decorator: Google::Apis::AppengineV1beta4::UrlMap::Representation
|
||||
|
||||
property :health_check, as: 'healthCheck', class: Google::Apis::AppengineV1beta4::HealthCheck, decorator: Google::Apis::AppengineV1beta4::HealthCheck::Representation
|
||||
|
||||
property :id, as: 'id'
|
||||
collection :inbound_services, as: 'inboundServices'
|
||||
property :instance_class, as: 'instanceClass'
|
||||
collection :libraries, as: 'libraries', class: Google::Apis::AppengineV1beta4::Library, decorator: Google::Apis::AppengineV1beta4::Library::Representation
|
||||
|
||||
property :manual_scaling, as: 'manualScaling', class: Google::Apis::AppengineV1beta4::ManualScaling, decorator: Google::Apis::AppengineV1beta4::ManualScaling::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
property :network, as: 'network', class: Google::Apis::AppengineV1beta4::Network, decorator: Google::Apis::AppengineV1beta4::Network::Representation
|
||||
|
||||
property :nobuild_files_regex, as: 'nobuildFilesRegex'
|
||||
property :resources, as: 'resources', class: Google::Apis::AppengineV1beta4::Resources, decorator: Google::Apis::AppengineV1beta4::Resources::Representation
|
||||
|
||||
property :runtime, as: 'runtime'
|
||||
property :runtime_api_version, as: 'runtimeApiVersion'
|
||||
property :serving_status, as: 'servingStatus'
|
||||
property :threadsafe, as: 'threadsafe'
|
||||
property :vm, as: 'vm'
|
||||
end
|
||||
end
|
||||
|
||||
class Volume
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :size_gb, as: 'sizeGb'
|
||||
property :volume_type, as: 'volumeType'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,876 @@
|
|||
# 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 AppengineV1beta4
|
||||
# Google App Engine Admin API
|
||||
#
|
||||
# The App Engine Admin API enables developers to provision and manage their App
|
||||
# Engine applications.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/appengine_v1beta4'
|
||||
#
|
||||
# Appengine = Google::Apis::AppengineV1beta4 # Alias the module
|
||||
# service = Appengine::AppengineService.new
|
||||
#
|
||||
# @see https://cloud.google.com/appengine/docs/admin-api/
|
||||
class AppengineService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://appengine.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Creates an App Engine application for a Google Cloud Platform project.
|
||||
# Required fields:
|
||||
# id - The ID of the target Cloud Platform project.
|
||||
# location - The region (https://cloud.google.com/appengine/docs/locations)
|
||||
# where you want the App Engine application located.For more information about
|
||||
# App Engine applications, see Managing Projects, Applications, and Billing (
|
||||
# https://cloud.google.com/appengine/docs/python/console/).
|
||||
# @param [Google::Apis::AppengineV1beta4::Application] application_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::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app(application_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta4/apps', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta4::Application::Representation
|
||||
command.request_object = application_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
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 an application.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the application to get. Example: apps/myapp.
|
||||
# @param [Boolean] ensure_resources_exist
|
||||
# Certain resources associated with an application are created on-demand.
|
||||
# Controls whether these resources should be created when performing the GET
|
||||
# operation. If specified and any resources could not be created, the request
|
||||
# will fail with an error code. Additionally, this parameter can cause the
|
||||
# request to take longer to complete.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Application] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::Application]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app(apps_id, ensure_resources_exist: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Application::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Application
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['ensureResourcesExist'] = ensure_resources_exist unless ensure_resources_exist.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the specified Application resource. You can update the following
|
||||
# fields:
|
||||
# auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/
|
||||
# v1beta4/apps#Application.FIELDS.auth_domain)
|
||||
# default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/
|
||||
# reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the Application resource to update. Example: apps/
|
||||
# myapp.
|
||||
# @param [Google::Apis::AppengineV1beta4::Application] application_object
|
||||
# @param [String] mask
|
||||
# Standard field mask for the set of fields to be updated.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app(apps_id, application_object = nil, mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1beta4/apps/{appsId}', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta4::Application::Representation
|
||||
command.request_object = application_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['mask'] = mask unless 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
|
||||
|
||||
# Get information about a location.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Resource name for the location.
|
||||
# @param [String] locations_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Location] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_location(apps_id, locations_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/locations/{locationsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Location::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Location
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['locationsId'] = locations_id unless locations_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 information about the supported locations for this service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The resource that owns the locations collection, if applicable.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta4::ListLocationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_locations(apps_id, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/locations', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::ListLocationsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::ListLocationsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes the specified module and all enclosed versions.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_module(apps_id, modules_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta4/apps/{appsId}/modules/{modulesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the current configuration of the specified module.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Module] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::Module]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_module(apps_id, modules_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/modules/{modulesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Module::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Module
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_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 modules in the application.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta4::ListModulesResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::ListModulesResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_modules(apps_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/modules', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::ListModulesResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::ListModulesResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the configuration of the specified module.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to update. Example: apps/myapp/modules/
|
||||
# default.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1beta4::Module] module_object
|
||||
# @param [String] mask
|
||||
# Standard field mask for the set of fields to be updated.
|
||||
# @param [Boolean] migrate_traffic
|
||||
# Set to true to gradually shift traffic to one or more versions that you
|
||||
# specify. By default, traffic is shifted immediately. For gradual traffic
|
||||
# migration, the target versions must be located within instances that are
|
||||
# configured for both warmup requests (https://cloud.google.com/appengine/docs/
|
||||
# admin-api/reference/rest/v1beta4/apps.modules.versions#inboundservicetype) and
|
||||
# automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/
|
||||
# rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the
|
||||
# shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/
|
||||
# v1beta4/apps.modules#shardby) field in the Module resource. Gradual traffic
|
||||
# migration is not supported in the App Engine flexible environment. For
|
||||
# examples, see Migrating and Splitting Traffic (https://cloud.google.com/
|
||||
# appengine/docs/admin-api/migrating-splitting-traffic).
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_module(apps_id, modules_id, module_object = nil, mask: nil, migrate_traffic: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1beta4/apps/{appsId}/modules/{modulesId}', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta4::Module::Representation
|
||||
command.request_object = module_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.query['mask'] = mask unless mask.nil?
|
||||
command.query['migrateTraffic'] = migrate_traffic unless migrate_traffic.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deploys code and resource files to a new version.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to update. Example: apps/myapp/modules/
|
||||
# default.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1beta4::Version] 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::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_module_version(apps_id, modules_id, version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta4::Version::Representation
|
||||
command.request_object = version_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes an existing version.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default/versions/v1.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_module_version(apps_id, modules_id, versions_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the specified Version resource. By default, only a BASIC_VIEW will be
|
||||
# returned. Specify the FULL_VIEW parameter to get the full resource.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default/versions/v1.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] view
|
||||
# Controls the set of fields returned in the Get 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::AppengineV1beta4::Version] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::Version]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_module_version(apps_id, modules_id, versions_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Version::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Version
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.query['view'] = view unless view.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists the versions of a module.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching the next page of results.
|
||||
# @param [String] view
|
||||
# Controls the set of fields returned in the List 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::AppengineV1beta4::ListVersionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::ListVersionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_module_versions(apps_id, modules_id, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::ListVersionsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::ListVersionsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['view'] = view unless view.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the specified Version resource. You can specify the following fields
|
||||
# depending on the App Engine environment and type of scaling that the version
|
||||
# resource uses:
|
||||
# serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/
|
||||
# rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For
|
||||
# Version resources that use basic scaling, manual scaling, or run in the App
|
||||
# Engine flexible environment.
|
||||
# instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/
|
||||
# rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For
|
||||
# Version resources that run in the App Engine standard environment.
|
||||
# automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/
|
||||
# admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.
|
||||
# automatic_scaling): For Version resources that use automatic scaling and run
|
||||
# in the App Engine standard environment.
|
||||
# automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/
|
||||
# admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.
|
||||
# automatic_scaling): For Version resources that use automatic scaling and run
|
||||
# in the App Engine standard environment.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to update. Example: apps/myapp/modules/
|
||||
# default/versions/1.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1beta4::Version] version_object
|
||||
# @param [String] mask
|
||||
# Standard field mask for the set of fields to be updated.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_module_version(apps_id, modules_id, versions_id, version_object = nil, mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta4::Version::Representation
|
||||
command.request_object = version_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.query['mask'] = mask unless 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
|
||||
|
||||
# Enables debugging on a VM instance. This allows you to use the SSH command to
|
||||
# connect to the virtual machine where the instance lives. While in "debug mode",
|
||||
# the instance continues to serve live traffic. You should delete the instance
|
||||
# when you are done debugging and then allow the system to take over and
|
||||
# determine if another instance should be started.Only applicable for instances
|
||||
# in App Engine flexible environment.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default/versions/v1/instances/instance-1.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] instances_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1beta4::DebugInstanceRequest] debug_instance_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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 debug_instance(apps_id, modules_id, versions_id, instances_id, debug_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta4::DebugInstanceRequest::Representation
|
||||
command.request_object = debug_instance_request_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.params['instancesId'] = instances_id unless instances_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
|
||||
|
||||
# Stops a running instance.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default/versions/v1/instances/instance-1.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] instances_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_module_version_instance(apps_id, modules_id, versions_id, instances_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.params['instancesId'] = instances_id unless instances_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 instance information.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default/versions/v1/instances/instance-1.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] instances_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Instance] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::Instance]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_module_version_instance(apps_id, modules_id, versions_id, instances_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Instance::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Instance
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.params['instancesId'] = instances_id unless instances_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 the instances of a version.Tip: To aggregate details about instances
|
||||
# over time, see the Stackdriver Monitoring API (https://cloud.google.com/
|
||||
# monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/modules/
|
||||
# default/versions/v1.
|
||||
# @param [String] modules_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta4::ListInstancesResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::ListInstancesResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_module_version_instances(apps_id, modules_id, versions_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::ListInstancesResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::ListInstancesResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['modulesId'] = modules_id unless modules_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the latest state of a long-running operation. Clients can use this method
|
||||
# to poll the operation result at intervals as recommended by the API service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The name of the operation resource.
|
||||
# @param [String] operations_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta4::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::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_app_operation(apps_id, operations_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/operations/{operationsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['operationsId'] = operations_id unless operations_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 operations that match the specified filter in the request. If the server
|
||||
# doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
|
||||
# allows API services to override the binding to use different resource name
|
||||
# schemes, such as users/*/operations. To override the binding, API services can
|
||||
# add a binding such as "/v1/`name=users/*`/operations" to their service
|
||||
# configuration. For backwards compatibility, the default name includes the
|
||||
# operations collection id, however overriding users must ensure the name
|
||||
# binding is the parent resource, without the operations collection id.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The name of the operation's parent resource.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta4::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta4::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_app_operations(apps_id, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta4/apps/{appsId}/operations', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta4::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta4::ListOperationsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,41 @@
|
|||
# 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/appengine_v1beta5/service.rb'
|
||||
require 'google/apis/appengine_v1beta5/classes.rb'
|
||||
require 'google/apis/appengine_v1beta5/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google App Engine Admin API
|
||||
#
|
||||
# The App Engine Admin API enables developers to provision and manage their App
|
||||
# Engine applications.
|
||||
#
|
||||
# @see https://cloud.google.com/appengine/docs/admin-api/
|
||||
module AppengineV1beta5
|
||||
VERSION = 'V1beta5'
|
||||
REVISION = '20170714'
|
||||
|
||||
# View and manage your applications deployed on Google App Engine
|
||||
AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,822 @@
|
|||
# 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 AppengineV1beta5
|
||||
|
||||
class ApiConfigHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ApiEndpointHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Application
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AutomaticScaling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BasicScaling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ContainerInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CpuUtilization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DebugInstanceRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Deployment
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DiskUtilization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class EndpointsApiService
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ErrorHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FileInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class HealthCheck
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class IdentityAwareProxy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Instance
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Library
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListInstancesResponse
|
||||
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 ListOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListServicesResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListVersionsResponse
|
||||
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 LocationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ManualScaling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Network
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NetworkUtilization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataExperimental
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Alpha
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta5
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class RequestUtilization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Resources
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ScriptHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Service
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SourceReference
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class StaticFilesHandler
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TrafficSplit
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UrlDispatchRule
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UrlMap
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Version
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Volume
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ApiConfigHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auth_fail_action, as: 'authFailAction'
|
||||
property :login, as: 'login'
|
||||
property :script, as: 'script'
|
||||
property :security_level, as: 'securityLevel'
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
|
||||
class ApiEndpointHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :script_path, as: 'scriptPath'
|
||||
end
|
||||
end
|
||||
|
||||
class Application
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auth_domain, as: 'authDomain'
|
||||
property :code_bucket, as: 'codeBucket'
|
||||
property :default_bucket, as: 'defaultBucket'
|
||||
property :default_cookie_expiration, as: 'defaultCookieExpiration'
|
||||
property :default_hostname, as: 'defaultHostname'
|
||||
collection :dispatch_rules, as: 'dispatchRules', class: Google::Apis::AppengineV1beta5::UrlDispatchRule, decorator: Google::Apis::AppengineV1beta5::UrlDispatchRule::Representation
|
||||
|
||||
property :iap, as: 'iap', class: Google::Apis::AppengineV1beta5::IdentityAwareProxy, decorator: Google::Apis::AppengineV1beta5::IdentityAwareProxy::Representation
|
||||
|
||||
property :id, as: 'id'
|
||||
property :location, as: 'location'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class AutomaticScaling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cool_down_period, as: 'coolDownPeriod'
|
||||
property :cpu_utilization, as: 'cpuUtilization', class: Google::Apis::AppengineV1beta5::CpuUtilization, decorator: Google::Apis::AppengineV1beta5::CpuUtilization::Representation
|
||||
|
||||
property :disk_utilization, as: 'diskUtilization', class: Google::Apis::AppengineV1beta5::DiskUtilization, decorator: Google::Apis::AppengineV1beta5::DiskUtilization::Representation
|
||||
|
||||
property :max_concurrent_requests, as: 'maxConcurrentRequests'
|
||||
property :max_idle_instances, as: 'maxIdleInstances'
|
||||
property :max_pending_latency, as: 'maxPendingLatency'
|
||||
property :max_total_instances, as: 'maxTotalInstances'
|
||||
property :min_idle_instances, as: 'minIdleInstances'
|
||||
property :min_pending_latency, as: 'minPendingLatency'
|
||||
property :min_total_instances, as: 'minTotalInstances'
|
||||
property :network_utilization, as: 'networkUtilization', class: Google::Apis::AppengineV1beta5::NetworkUtilization, decorator: Google::Apis::AppengineV1beta5::NetworkUtilization::Representation
|
||||
|
||||
property :request_utilization, as: 'requestUtilization', class: Google::Apis::AppengineV1beta5::RequestUtilization, decorator: Google::Apis::AppengineV1beta5::RequestUtilization::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class BasicScaling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :idle_timeout, as: 'idleTimeout'
|
||||
property :max_instances, as: 'maxInstances'
|
||||
end
|
||||
end
|
||||
|
||||
class ContainerInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :image, as: 'image'
|
||||
end
|
||||
end
|
||||
|
||||
class CpuUtilization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :aggregation_window_length, as: 'aggregationWindowLength'
|
||||
property :target_utilization, as: 'targetUtilization'
|
||||
end
|
||||
end
|
||||
|
||||
class DebugInstanceRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :ssh_key, as: 'sshKey'
|
||||
end
|
||||
end
|
||||
|
||||
class Deployment
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :container, as: 'container', class: Google::Apis::AppengineV1beta5::ContainerInfo, decorator: Google::Apis::AppengineV1beta5::ContainerInfo::Representation
|
||||
|
||||
hash :files, as: 'files', class: Google::Apis::AppengineV1beta5::FileInfo, decorator: Google::Apis::AppengineV1beta5::FileInfo::Representation
|
||||
|
||||
collection :source_references, as: 'sourceReferences', class: Google::Apis::AppengineV1beta5::SourceReference, decorator: Google::Apis::AppengineV1beta5::SourceReference::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class DiskUtilization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :target_read_bytes_per_sec, as: 'targetReadBytesPerSec'
|
||||
property :target_read_ops_per_sec, as: 'targetReadOpsPerSec'
|
||||
property :target_write_bytes_per_sec, as: 'targetWriteBytesPerSec'
|
||||
property :target_write_ops_per_sec, as: 'targetWriteOpsPerSec'
|
||||
end
|
||||
end
|
||||
|
||||
class EndpointsApiService
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :config_id, as: 'configId'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class ErrorHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :error_code, as: 'errorCode'
|
||||
property :mime_type, as: 'mimeType'
|
||||
property :static_file, as: 'staticFile'
|
||||
end
|
||||
end
|
||||
|
||||
class FileInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :mime_type, as: 'mimeType'
|
||||
property :sha1_sum, as: 'sha1Sum'
|
||||
property :source_url, as: 'sourceUrl'
|
||||
end
|
||||
end
|
||||
|
||||
class HealthCheck
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :check_interval, as: 'checkInterval'
|
||||
property :disable_health_check, as: 'disableHealthCheck'
|
||||
property :healthy_threshold, as: 'healthyThreshold'
|
||||
property :host, as: 'host'
|
||||
property :restart_threshold, as: 'restartThreshold'
|
||||
property :timeout, as: 'timeout'
|
||||
property :unhealthy_threshold, as: 'unhealthyThreshold'
|
||||
end
|
||||
end
|
||||
|
||||
class IdentityAwareProxy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :enabled, as: 'enabled'
|
||||
property :oauth2_client_id, as: 'oauth2ClientId'
|
||||
property :oauth2_client_secret, as: 'oauth2ClientSecret'
|
||||
property :oauth2_client_secret_sha256, as: 'oauth2ClientSecretSha256'
|
||||
end
|
||||
end
|
||||
|
||||
class Instance
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :app_engine_release, as: 'appEngineRelease'
|
||||
property :availability, as: 'availability'
|
||||
property :average_latency, as: 'averageLatency'
|
||||
property :errors, as: 'errors'
|
||||
property :id, as: 'id'
|
||||
property :memory_usage, :numeric_string => true, as: 'memoryUsage'
|
||||
property :name, as: 'name'
|
||||
property :qps, as: 'qps'
|
||||
property :requests, as: 'requests'
|
||||
property :start_timestamp, as: 'startTimestamp'
|
||||
property :vm_id, as: 'vmId'
|
||||
property :vm_ip, as: 'vmIp'
|
||||
property :vm_name, as: 'vmName'
|
||||
property :vm_status, as: 'vmStatus'
|
||||
property :vm_unlocked, as: 'vmUnlocked'
|
||||
property :vm_zone_name, as: 'vmZoneName'
|
||||
end
|
||||
end
|
||||
|
||||
class Library
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class ListInstancesResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :instances, as: 'instances', class: Google::Apis::AppengineV1beta5::Instance, decorator: Google::Apis::AppengineV1beta5::Instance::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListLocationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :locations, as: 'locations', class: Google::Apis::AppengineV1beta5::Location, decorator: Google::Apis::AppengineV1beta5::Location::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :operations, as: 'operations', class: Google::Apis::AppengineV1beta5::Operation, decorator: Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ListServicesResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :services, as: 'services', class: Google::Apis::AppengineV1beta5::Service, decorator: Google::Apis::AppengineV1beta5::Service::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ListVersionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :versions, as: 'versions', class: Google::Apis::AppengineV1beta5::Version, decorator: Google::Apis::AppengineV1beta5::Version::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Location
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :labels, as: 'labels'
|
||||
property :location_id, as: 'locationId'
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class LocationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :flexible_environment_available, as: 'flexibleEnvironmentAvailable'
|
||||
property :standard_environment_available, as: 'standardEnvironmentAvailable'
|
||||
end
|
||||
end
|
||||
|
||||
class ManualScaling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :instances, as: 'instances'
|
||||
end
|
||||
end
|
||||
|
||||
class Network
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :forwarded_ports, as: 'forwardedPorts'
|
||||
property :instance_tag, as: 'instanceTag'
|
||||
property :name, as: 'name'
|
||||
property :subnetwork_name, as: 'subnetworkName'
|
||||
end
|
||||
end
|
||||
|
||||
class NetworkUtilization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :target_received_bytes_per_sec, as: 'targetReceivedBytesPerSec'
|
||||
property :target_received_packets_per_sec, as: 'targetReceivedPacketsPerSec'
|
||||
property :target_sent_bytes_per_sec, as: 'targetSentBytesPerSec'
|
||||
property :target_sent_packets_per_sec, as: 'targetSentPacketsPerSec'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
property :error, as: 'error', class: Google::Apis::AppengineV1beta5::Status, decorator: Google::Apis::AppengineV1beta5::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataExperimental
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Alpha
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :ephemeral_message, as: 'ephemeralMessage'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
collection :warning, as: 'warning'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta5
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :method_prop, as: 'method'
|
||||
property :target, as: 'target'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
class RequestUtilization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :target_concurrent_requests, as: 'targetConcurrentRequests'
|
||||
property :target_request_count_per_sec, as: 'targetRequestCountPerSec'
|
||||
end
|
||||
end
|
||||
|
||||
class Resources
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cpu, as: 'cpu'
|
||||
property :disk_gb, as: 'diskGb'
|
||||
property :memory_gb, as: 'memoryGb'
|
||||
collection :volumes, as: 'volumes', class: Google::Apis::AppengineV1beta5::Volume, decorator: Google::Apis::AppengineV1beta5::Volume::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ScriptHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :script_path, as: 'scriptPath'
|
||||
end
|
||||
end
|
||||
|
||||
class Service
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :name, as: 'name'
|
||||
property :split, as: 'split', class: Google::Apis::AppengineV1beta5::TrafficSplit, decorator: Google::Apis::AppengineV1beta5::TrafficSplit::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class SourceReference
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :repository, as: 'repository'
|
||||
property :revision_id, as: 'revisionId'
|
||||
end
|
||||
end
|
||||
|
||||
class StaticFilesHandler
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :application_readable, as: 'applicationReadable'
|
||||
property :expiration, as: 'expiration'
|
||||
hash :http_headers, as: 'httpHeaders'
|
||||
property :mime_type, as: 'mimeType'
|
||||
property :path, as: 'path'
|
||||
property :require_matching_file, as: 'requireMatchingFile'
|
||||
property :upload_path_regex, as: 'uploadPathRegex'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
|
||||
class TrafficSplit
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :allocations, as: 'allocations'
|
||||
property :shard_by, as: 'shardBy'
|
||||
end
|
||||
end
|
||||
|
||||
class UrlDispatchRule
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :domain, as: 'domain'
|
||||
property :path, as: 'path'
|
||||
property :service, as: 'service'
|
||||
end
|
||||
end
|
||||
|
||||
class UrlMap
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :api_endpoint, as: 'apiEndpoint', class: Google::Apis::AppengineV1beta5::ApiEndpointHandler, decorator: Google::Apis::AppengineV1beta5::ApiEndpointHandler::Representation
|
||||
|
||||
property :auth_fail_action, as: 'authFailAction'
|
||||
property :login, as: 'login'
|
||||
property :redirect_http_response_code, as: 'redirectHttpResponseCode'
|
||||
property :script, as: 'script', class: Google::Apis::AppengineV1beta5::ScriptHandler, decorator: Google::Apis::AppengineV1beta5::ScriptHandler::Representation
|
||||
|
||||
property :security_level, as: 'securityLevel'
|
||||
property :static_files, as: 'staticFiles', class: Google::Apis::AppengineV1beta5::StaticFilesHandler, decorator: Google::Apis::AppengineV1beta5::StaticFilesHandler::Representation
|
||||
|
||||
property :url_regex, as: 'urlRegex'
|
||||
end
|
||||
end
|
||||
|
||||
class Version
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :api_config, as: 'apiConfig', class: Google::Apis::AppengineV1beta5::ApiConfigHandler, decorator: Google::Apis::AppengineV1beta5::ApiConfigHandler::Representation
|
||||
|
||||
property :automatic_scaling, as: 'automaticScaling', class: Google::Apis::AppengineV1beta5::AutomaticScaling, decorator: Google::Apis::AppengineV1beta5::AutomaticScaling::Representation
|
||||
|
||||
property :basic_scaling, as: 'basicScaling', class: Google::Apis::AppengineV1beta5::BasicScaling, decorator: Google::Apis::AppengineV1beta5::BasicScaling::Representation
|
||||
|
||||
hash :beta_settings, as: 'betaSettings'
|
||||
property :creation_time, as: 'creationTime'
|
||||
property :default_expiration, as: 'defaultExpiration'
|
||||
property :deployer, as: 'deployer'
|
||||
property :deployment, as: 'deployment', class: Google::Apis::AppengineV1beta5::Deployment, decorator: Google::Apis::AppengineV1beta5::Deployment::Representation
|
||||
|
||||
property :disk_usage_bytes, :numeric_string => true, as: 'diskUsageBytes'
|
||||
property :endpoints_api_service, as: 'endpointsApiService', class: Google::Apis::AppengineV1beta5::EndpointsApiService, decorator: Google::Apis::AppengineV1beta5::EndpointsApiService::Representation
|
||||
|
||||
property :env, as: 'env'
|
||||
hash :env_variables, as: 'envVariables'
|
||||
collection :error_handlers, as: 'errorHandlers', class: Google::Apis::AppengineV1beta5::ErrorHandler, decorator: Google::Apis::AppengineV1beta5::ErrorHandler::Representation
|
||||
|
||||
collection :handlers, as: 'handlers', class: Google::Apis::AppengineV1beta5::UrlMap, decorator: Google::Apis::AppengineV1beta5::UrlMap::Representation
|
||||
|
||||
property :health_check, as: 'healthCheck', class: Google::Apis::AppengineV1beta5::HealthCheck, decorator: Google::Apis::AppengineV1beta5::HealthCheck::Representation
|
||||
|
||||
property :id, as: 'id'
|
||||
collection :inbound_services, as: 'inboundServices'
|
||||
property :instance_class, as: 'instanceClass'
|
||||
collection :libraries, as: 'libraries', class: Google::Apis::AppengineV1beta5::Library, decorator: Google::Apis::AppengineV1beta5::Library::Representation
|
||||
|
||||
property :manual_scaling, as: 'manualScaling', class: Google::Apis::AppengineV1beta5::ManualScaling, decorator: Google::Apis::AppengineV1beta5::ManualScaling::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
property :network, as: 'network', class: Google::Apis::AppengineV1beta5::Network, decorator: Google::Apis::AppengineV1beta5::Network::Representation
|
||||
|
||||
property :nobuild_files_regex, as: 'nobuildFilesRegex'
|
||||
property :resources, as: 'resources', class: Google::Apis::AppengineV1beta5::Resources, decorator: Google::Apis::AppengineV1beta5::Resources::Representation
|
||||
|
||||
property :runtime, as: 'runtime'
|
||||
property :runtime_api_version, as: 'runtimeApiVersion'
|
||||
property :serving_status, as: 'servingStatus'
|
||||
property :threadsafe, as: 'threadsafe'
|
||||
property :vm, as: 'vm'
|
||||
end
|
||||
end
|
||||
|
||||
class Volume
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :size_gb, as: 'sizeGb'
|
||||
property :volume_type, as: 'volumeType'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,877 @@
|
|||
# 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 AppengineV1beta5
|
||||
# Google App Engine Admin API
|
||||
#
|
||||
# The App Engine Admin API enables developers to provision and manage their App
|
||||
# Engine applications.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/appengine_v1beta5'
|
||||
#
|
||||
# Appengine = Google::Apis::AppengineV1beta5 # Alias the module
|
||||
# service = Appengine::AppengineService.new
|
||||
#
|
||||
# @see https://cloud.google.com/appengine/docs/admin-api/
|
||||
class AppengineService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://appengine.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Creates an App Engine application for a Google Cloud Platform project.
|
||||
# Required fields:
|
||||
# id - The ID of the target Cloud Platform project.
|
||||
# location - The region (https://cloud.google.com/appengine/docs/locations)
|
||||
# where you want the App Engine application located.For more information about
|
||||
# App Engine applications, see Managing Projects, Applications, and Billing (
|
||||
# https://cloud.google.com/appengine/docs/python/console/).
|
||||
# @param [Google::Apis::AppengineV1beta5::Application] application_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::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app(application_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta5/apps', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta5::Application::Representation
|
||||
command.request_object = application_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
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 an application.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the application to get. Example: apps/myapp.
|
||||
# @param [Boolean] ensure_resources_exist
|
||||
# Certain resources associated with an application are created on-demand.
|
||||
# Controls whether these resources should be created when performing the GET
|
||||
# operation. If specified and any resources could not be created, the request
|
||||
# will fail with an error code. Additionally, this parameter can cause the
|
||||
# request to take longer to complete. Note: This parameter will be deprecated in
|
||||
# a future version of the API.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Application] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::Application]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app(apps_id, ensure_resources_exist: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Application::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Application
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['ensureResourcesExist'] = ensure_resources_exist unless ensure_resources_exist.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the specified Application resource. You can update the following
|
||||
# fields:
|
||||
# auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/
|
||||
# v1beta5/apps#Application.FIELDS.auth_domain)
|
||||
# default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/
|
||||
# reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the Application resource to update. Example: apps/
|
||||
# myapp.
|
||||
# @param [Google::Apis::AppengineV1beta5::Application] application_object
|
||||
# @param [String] mask
|
||||
# Standard field mask for the set of fields to be updated.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app(apps_id, application_object = nil, mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1beta5/apps/{appsId}', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta5::Application::Representation
|
||||
command.request_object = application_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['mask'] = mask unless 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
|
||||
|
||||
# Get information about a location.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Resource name for the location.
|
||||
# @param [String] locations_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Location] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_location(apps_id, locations_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/locations/{locationsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Location::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Location
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['locationsId'] = locations_id unless locations_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 information about the supported locations for this service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The resource that owns the locations collection, if applicable.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta5::ListLocationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_locations(apps_id, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/locations', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::ListLocationsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::ListLocationsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the latest state of a long-running operation. Clients can use this method
|
||||
# to poll the operation result at intervals as recommended by the API service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The name of the operation resource.
|
||||
# @param [String] operations_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_operation(apps_id, operations_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/operations/{operationsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['operationsId'] = operations_id unless operations_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 operations that match the specified filter in the request. If the server
|
||||
# doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
|
||||
# allows API services to override the binding to use different resource name
|
||||
# schemes, such as users/*/operations. To override the binding, API services can
|
||||
# add a binding such as "/v1/`name=users/*`/operations" to their service
|
||||
# configuration. For backwards compatibility, the default name includes the
|
||||
# operations collection id, however overriding users must ensure the name
|
||||
# binding is the parent resource, without the operations collection id.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. The name of the operation's parent resource.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta5::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_app_operations(apps_id, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/operations', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::ListOperationsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes the specified service and all enclosed versions.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/services/
|
||||
# default.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_service(apps_id, services_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta5/apps/{appsId}/services/{servicesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the current configuration of the specified service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/services/
|
||||
# default.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Service] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::Service]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_service(apps_id, services_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/services/{servicesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Service::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Service
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_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 services in the application.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta5::ListServicesResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::ListServicesResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_services(apps_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/services', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::ListServicesResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::ListServicesResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the configuration of the specified service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to update. Example: apps/myapp/services/
|
||||
# default.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1beta5::Service] service_object
|
||||
# @param [String] mask
|
||||
# Standard field mask for the set of fields to be updated.
|
||||
# @param [Boolean] migrate_traffic
|
||||
# Set to true to gradually shift traffic to one or more versions that you
|
||||
# specify. By default, traffic is shifted immediately. For gradual traffic
|
||||
# migration, the target versions must be located within instances that are
|
||||
# configured for both warmup requests (https://cloud.google.com/appengine/docs/
|
||||
# admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype)
|
||||
# and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/
|
||||
# reference/rest/v1beta5/apps.services.versions#automaticscaling). You must
|
||||
# specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/
|
||||
# reference/rest/v1beta5/apps.services#shardby) field in the Service resource.
|
||||
# Gradual traffic migration is not supported in the App Engine flexible
|
||||
# environment. For examples, see Migrating and Splitting Traffic (https://cloud.
|
||||
# google.com/appengine/docs/admin-api/migrating-splitting-traffic).
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_service(apps_id, services_id, service_object = nil, mask: nil, migrate_traffic: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1beta5/apps/{appsId}/services/{servicesId}', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta5::Service::Representation
|
||||
command.request_object = service_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.query['mask'] = mask unless mask.nil?
|
||||
command.query['migrateTraffic'] = migrate_traffic unless migrate_traffic.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deploys new code and resource files to a new version.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to update. For example: "apps/myapp/
|
||||
# services/default".
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1beta5::Version] 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::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_service_version(apps_id, services_id, version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta5/apps/{appsId}/services/{servicesId}/versions', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta5::Version::Representation
|
||||
command.request_object = version_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes an existing version.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/services/
|
||||
# default/versions/v1.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_service_version(apps_id, services_id, versions_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the specified Version resource. By default, only a BASIC_VIEW will be
|
||||
# returned. Specify the FULL_VIEW parameter to get the full resource.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/services/
|
||||
# default/versions/v1.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] view
|
||||
# Controls the set of fields returned in the Get 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::AppengineV1beta5::Version] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::Version]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_service_version(apps_id, services_id, versions_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Version::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Version
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.query['view'] = view unless view.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists the versions of a service.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/services/
|
||||
# default.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching the next page of results.
|
||||
# @param [String] view
|
||||
# Controls the set of fields returned in the List 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::AppengineV1beta5::ListVersionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::ListVersionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_service_versions(apps_id, services_id, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/services/{servicesId}/versions', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::ListVersionsResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::ListVersionsResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['view'] = view unless view.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the specified Version resource. You can specify the following fields
|
||||
# depending on the App Engine environment and type of scaling that the version
|
||||
# resource uses:
|
||||
# serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/
|
||||
# rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For
|
||||
# Version resources that use basic scaling, manual scaling, or run in the App
|
||||
# Engine flexible environment.
|
||||
# instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/
|
||||
# rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For
|
||||
# Version resources that run in the App Engine standard environment.
|
||||
# automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/
|
||||
# admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.
|
||||
# automatic_scaling): For Version resources that use automatic scaling and run
|
||||
# in the App Engine standard environment.
|
||||
# automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/
|
||||
# admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.
|
||||
# automatic_scaling): For Version resources that use automatic scaling and run
|
||||
# in the App Engine standard environment.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource to update. Example: apps/myapp/services/
|
||||
# default/versions/1.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1beta5::Version] version_object
|
||||
# @param [String] mask
|
||||
# Standard field mask for the set of fields to be updated.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_service_version(apps_id, services_id, versions_id, version_object = nil, mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta5::Version::Representation
|
||||
command.request_object = version_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.query['mask'] = mask unless 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
|
||||
|
||||
# Enables debugging on a VM instance. This allows you to use the SSH command to
|
||||
# connect to the virtual machine where the instance lives. While in "debug mode",
|
||||
# the instance continues to serve live traffic. You should delete the instance
|
||||
# when you are done debugging and then allow the system to take over and
|
||||
# determine if another instance should be started.Only applicable for instances
|
||||
# in App Engine flexible environment.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/services/
|
||||
# default/versions/v1/instances/instance-1.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] instances_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Google::Apis::AppengineV1beta5::DebugInstanceRequest] debug_instance_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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 debug_instance(apps_id, services_id, versions_id, instances_id, debug_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug', options)
|
||||
command.request_representation = Google::Apis::AppengineV1beta5::DebugInstanceRequest::Representation
|
||||
command.request_object = debug_instance_request_object
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.params['instancesId'] = instances_id unless instances_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
|
||||
|
||||
# Stops a running instance.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. For example: "apps/myapp/
|
||||
# services/default/versions/v1/instances/instance-1".
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] instances_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::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_app_service_version_instance(apps_id, services_id, versions_id, instances_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Operation::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Operation
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.params['instancesId'] = instances_id unless instances_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 instance information.
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/services/
|
||||
# default/versions/v1/instances/instance-1.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] instances_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::AppengineV1beta5::Instance] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::Instance]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_service_version_instance(apps_id, services_id, versions_id, instances_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::Instance::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::Instance
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.params['instancesId'] = instances_id unless instances_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 the instances of a version.Tip: To aggregate details about instances
|
||||
# over time, see the Stackdriver Monitoring API (https://cloud.google.com/
|
||||
# monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
|
||||
# @param [String] apps_id
|
||||
# Part of `name`. Name of the resource requested. Example: apps/myapp/services/
|
||||
# default/versions/v1.
|
||||
# @param [String] services_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [String] versions_id
|
||||
# Part of `name`. See documentation of `appsId`.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum results to return per page.
|
||||
# @param [String] page_token
|
||||
# Continuation token for fetching 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AppengineV1beta5::ListInstancesResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AppengineV1beta5::ListInstancesResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_app_service_version_instances(apps_id, services_id, versions_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances', options)
|
||||
command.response_representation = Google::Apis::AppengineV1beta5::ListInstancesResponse::Representation
|
||||
command.response_class = Google::Apis::AppengineV1beta5::ListInstancesResponse
|
||||
command.params['appsId'] = apps_id unless apps_id.nil?
|
||||
command.params['servicesId'] = services_id unless services_id.nil?
|
||||
command.params['versionsId'] = versions_id unless versions_id.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/blogger_v2/service.rb'
|
||||
require 'google/apis/blogger_v2/classes.rb'
|
||||
require 'google/apis/blogger_v2/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Blogger API
|
||||
#
|
||||
# API for access to the data within Blogger.
|
||||
#
|
||||
# @see https://developers.google.com/blogger/docs/2.0/json/getting_started
|
||||
module BloggerV2
|
||||
VERSION = 'V2'
|
||||
REVISION = '20150422'
|
||||
|
||||
# Manage your Blogger account
|
||||
AUTH_BLOGGER = 'https://www.googleapis.com/auth/blogger'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,947 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require '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 BloggerV2
|
||||
|
||||
#
|
||||
class Blog
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The description of this blog. This is displayed underneath the title.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# The identifier for this resource.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# The kind of this entry. Always blogger#blog
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# The locale this Blog is set to.
|
||||
# Corresponds to the JSON property `locale`
|
||||
# @return [Google::Apis::BloggerV2::Blog::Locale]
|
||||
attr_accessor :locale
|
||||
|
||||
# The name of this blog. This is displayed as the title.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The container of pages in this blog.
|
||||
# Corresponds to the JSON property `pages`
|
||||
# @return [Google::Apis::BloggerV2::Blog::Pages]
|
||||
attr_accessor :pages
|
||||
|
||||
# The container of posts in this blog.
|
||||
# Corresponds to the JSON property `posts`
|
||||
# @return [Google::Apis::BloggerV2::Blog::Posts]
|
||||
attr_accessor :posts
|
||||
|
||||
# RFC 3339 date-time when this blog was published.
|
||||
# Corresponds to the JSON property `published`
|
||||
# @return [DateTime]
|
||||
attr_accessor :published
|
||||
|
||||
# The API REST URL to fetch this resource from.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# RFC 3339 date-time when this blog was last updated.
|
||||
# Corresponds to the JSON property `updated`
|
||||
# @return [DateTime]
|
||||
attr_accessor :updated
|
||||
|
||||
# The URL where this blog is published.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@locale = args[:locale] if args.key?(:locale)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@pages = args[:pages] if args.key?(:pages)
|
||||
@posts = args[:posts] if args.key?(:posts)
|
||||
@published = args[:published] if args.key?(:published)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@updated = args[:updated] if args.key?(:updated)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
|
||||
# The locale this Blog is set to.
|
||||
class Locale
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The country this blog's locale is set to.
|
||||
# Corresponds to the JSON property `country`
|
||||
# @return [String]
|
||||
attr_accessor :country
|
||||
|
||||
# The language this blog is authored in.
|
||||
# Corresponds to the JSON property `language`
|
||||
# @return [String]
|
||||
attr_accessor :language
|
||||
|
||||
# The language variant this blog is authored in.
|
||||
# Corresponds to the JSON property `variant`
|
||||
# @return [String]
|
||||
attr_accessor :variant
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@country = args[:country] if args.key?(:country)
|
||||
@language = args[:language] if args.key?(:language)
|
||||
@variant = args[:variant] if args.key?(:variant)
|
||||
end
|
||||
end
|
||||
|
||||
# The container of pages in this blog.
|
||||
class Pages
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The URL of the container for pages in this blog.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# The count of pages in this blog.
|
||||
# Corresponds to the JSON property `totalItems`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_items
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@total_items = args[:total_items] if args.key?(:total_items)
|
||||
end
|
||||
end
|
||||
|
||||
# The container of posts in this blog.
|
||||
class Posts
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The URL of the container for posts in this blog.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# The count of posts in this blog.
|
||||
# Corresponds to the JSON property `totalItems`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_items
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@total_items = args[:total_items] if args.key?(:total_items)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class BlogList
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The list of Blogs this user has Authorship or Admin rights over.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::BloggerV2::Blog>]
|
||||
attr_accessor :items
|
||||
|
||||
# The kind of this entity. Always blogger#blogList
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class Comment
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The author of this Comment.
|
||||
# Corresponds to the JSON property `author`
|
||||
# @return [Google::Apis::BloggerV2::Comment::Author]
|
||||
attr_accessor :author
|
||||
|
||||
# Data about the blog containing this comment.
|
||||
# Corresponds to the JSON property `blog`
|
||||
# @return [Google::Apis::BloggerV2::Comment::Blog]
|
||||
attr_accessor :blog
|
||||
|
||||
# The actual content of the comment. May include HTML markup.
|
||||
# Corresponds to the JSON property `content`
|
||||
# @return [String]
|
||||
attr_accessor :content
|
||||
|
||||
# The identifier for this resource.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# Data about the comment this is in reply to.
|
||||
# Corresponds to the JSON property `inReplyTo`
|
||||
# @return [Google::Apis::BloggerV2::Comment::InReplyTo]
|
||||
attr_accessor :in_reply_to
|
||||
|
||||
# The kind of this entry. Always blogger#comment
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Data about the post containing this comment.
|
||||
# Corresponds to the JSON property `post`
|
||||
# @return [Google::Apis::BloggerV2::Comment::Post]
|
||||
attr_accessor :post
|
||||
|
||||
# RFC 3339 date-time when this comment was published.
|
||||
# Corresponds to the JSON property `published`
|
||||
# @return [DateTime]
|
||||
attr_accessor :published
|
||||
|
||||
# The API REST URL to fetch this resource from.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# RFC 3339 date-time when this comment was last updated.
|
||||
# Corresponds to the JSON property `updated`
|
||||
# @return [DateTime]
|
||||
attr_accessor :updated
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@author = args[:author] if args.key?(:author)
|
||||
@blog = args[:blog] if args.key?(:blog)
|
||||
@content = args[:content] if args.key?(:content)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@in_reply_to = args[:in_reply_to] if args.key?(:in_reply_to)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@post = args[:post] if args.key?(:post)
|
||||
@published = args[:published] if args.key?(:published)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@updated = args[:updated] if args.key?(:updated)
|
||||
end
|
||||
|
||||
# The author of this Comment.
|
||||
class Author
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The display name.
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# The identifier of the Comment creator.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# The comment creator's avatar.
|
||||
# Corresponds to the JSON property `image`
|
||||
# @return [Google::Apis::BloggerV2::Comment::Author::Image]
|
||||
attr_accessor :image
|
||||
|
||||
# The URL of the Comment creator's Profile page.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@image = args[:image] if args.key?(:image)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
|
||||
# The comment creator's avatar.
|
||||
class Image
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The comment creator's avatar URL.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Data about the blog containing this comment.
|
||||
class Blog
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The identifier of the blog containing this comment.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
end
|
||||
end
|
||||
|
||||
# Data about the comment this is in reply to.
|
||||
class InReplyTo
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The identified of the parent of this comment.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
end
|
||||
end
|
||||
|
||||
# Data about the post containing this comment.
|
||||
class Post
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The identifier of the post containing this comment.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class CommentList
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The List of Comments for a Post.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::BloggerV2::Comment>]
|
||||
attr_accessor :items
|
||||
|
||||
# The kind of this entry. Always blogger#commentList
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Pagination token to fetch the next page, if one exists.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# Pagination token to fetch the previous page, if one exists.
|
||||
# Corresponds to the JSON property `prevPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :prev_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)
|
||||
@prev_page_token = args[:prev_page_token] if args.key?(:prev_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class Page
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The author of this Page.
|
||||
# Corresponds to the JSON property `author`
|
||||
# @return [Google::Apis::BloggerV2::Page::Author]
|
||||
attr_accessor :author
|
||||
|
||||
# Data about the blog containing this Page.
|
||||
# Corresponds to the JSON property `blog`
|
||||
# @return [Google::Apis::BloggerV2::Page::Blog]
|
||||
attr_accessor :blog
|
||||
|
||||
# The body content of this Page, in HTML.
|
||||
# Corresponds to the JSON property `content`
|
||||
# @return [String]
|
||||
attr_accessor :content
|
||||
|
||||
# The identifier for this resource.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# The kind of this entity. Always blogger#page
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# RFC 3339 date-time when this Page was published.
|
||||
# Corresponds to the JSON property `published`
|
||||
# @return [DateTime]
|
||||
attr_accessor :published
|
||||
|
||||
# The API REST URL to fetch this resource from.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# The title of this entity. This is the name displayed in the Admin user
|
||||
# interface.
|
||||
# Corresponds to the JSON property `title`
|
||||
# @return [String]
|
||||
attr_accessor :title
|
||||
|
||||
# RFC 3339 date-time when this Page was last updated.
|
||||
# Corresponds to the JSON property `updated`
|
||||
# @return [DateTime]
|
||||
attr_accessor :updated
|
||||
|
||||
# The URL that this Page is displayed at.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@author = args[:author] if args.key?(:author)
|
||||
@blog = args[:blog] if args.key?(:blog)
|
||||
@content = args[:content] if args.key?(:content)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@published = args[:published] if args.key?(:published)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
@updated = args[:updated] if args.key?(:updated)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
|
||||
# The author of this Page.
|
||||
class Author
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The display name.
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# The identifier of the Page creator.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# The page author's avatar.
|
||||
# Corresponds to the JSON property `image`
|
||||
# @return [Google::Apis::BloggerV2::Page::Author::Image]
|
||||
attr_accessor :image
|
||||
|
||||
# The URL of the Page creator's Profile page.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@image = args[:image] if args.key?(:image)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
|
||||
# The page author's avatar.
|
||||
class Image
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The page author's avatar URL.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Data about the blog containing this Page.
|
||||
class Blog
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The identifier of the blog containing this page.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PageList
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The list of Pages for a Blog.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::BloggerV2::Page>]
|
||||
attr_accessor :items
|
||||
|
||||
# The kind of this entity. Always blogger#pageList
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class Post
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The author of this Post.
|
||||
# Corresponds to the JSON property `author`
|
||||
# @return [Google::Apis::BloggerV2::Post::Author]
|
||||
attr_accessor :author
|
||||
|
||||
# Data about the blog containing this Post.
|
||||
# Corresponds to the JSON property `blog`
|
||||
# @return [Google::Apis::BloggerV2::Post::Blog]
|
||||
attr_accessor :blog
|
||||
|
||||
# The content of the Post. May contain HTML markup.
|
||||
# Corresponds to the JSON property `content`
|
||||
# @return [String]
|
||||
attr_accessor :content
|
||||
|
||||
# The identifier of this Post.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# The kind of this entity. Always blogger#post
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# The list of labels this Post was tagged with.
|
||||
# Corresponds to the JSON property `labels`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :labels
|
||||
|
||||
# RFC 3339 date-time when this Post was published.
|
||||
# Corresponds to the JSON property `published`
|
||||
# @return [DateTime]
|
||||
attr_accessor :published
|
||||
|
||||
# The container of comments on this Post.
|
||||
# Corresponds to the JSON property `replies`
|
||||
# @return [Google::Apis::BloggerV2::Post::Replies]
|
||||
attr_accessor :replies
|
||||
|
||||
# The API REST URL to fetch this resource from.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# The title of the Post.
|
||||
# Corresponds to the JSON property `title`
|
||||
# @return [String]
|
||||
attr_accessor :title
|
||||
|
||||
# RFC 3339 date-time when this Post was last updated.
|
||||
# Corresponds to the JSON property `updated`
|
||||
# @return [DateTime]
|
||||
attr_accessor :updated
|
||||
|
||||
# The URL where this Post is displayed.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@author = args[:author] if args.key?(:author)
|
||||
@blog = args[:blog] if args.key?(:blog)
|
||||
@content = args[:content] if args.key?(:content)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@labels = args[:labels] if args.key?(:labels)
|
||||
@published = args[:published] if args.key?(:published)
|
||||
@replies = args[:replies] if args.key?(:replies)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
@updated = args[:updated] if args.key?(:updated)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
|
||||
# The author of this Post.
|
||||
class Author
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The display name.
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# The identifier of the Post creator.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# The Post author's avatar.
|
||||
# Corresponds to the JSON property `image`
|
||||
# @return [Google::Apis::BloggerV2::Post::Author::Image]
|
||||
attr_accessor :image
|
||||
|
||||
# The URL of the Post creator's Profile page.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@image = args[:image] if args.key?(:image)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
|
||||
# The Post author's avatar.
|
||||
class Image
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The Post author's avatar URL.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Data about the blog containing this Post.
|
||||
class Blog
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The identifier of the Blog that contains this Post.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
end
|
||||
end
|
||||
|
||||
# The container of comments on this Post.
|
||||
class Replies
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The URL of the comments on this post.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# The count of comments on this post.
|
||||
# Corresponds to the JSON property `totalItems`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_items
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@total_items = args[:total_items] if args.key?(:total_items)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class PostList
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The list of Posts for this Blog.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::BloggerV2::Post>]
|
||||
attr_accessor :items
|
||||
|
||||
# The kind of this entity. Always blogger#postList
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Pagination token to fetch the next page, if one exists.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# Pagination token to fetch the previous page, if one exists.
|
||||
# Corresponds to the JSON property `prevPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :prev_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)
|
||||
@prev_page_token = args[:prev_page_token] if args.key?(:prev_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class User
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Profile summary information.
|
||||
# Corresponds to the JSON property `about`
|
||||
# @return [String]
|
||||
attr_accessor :about
|
||||
|
||||
# The container of blogs for this user.
|
||||
# Corresponds to the JSON property `blogs`
|
||||
# @return [Google::Apis::BloggerV2::User::Blogs]
|
||||
attr_accessor :blogs
|
||||
|
||||
# The timestamp of when this profile was created, in seconds since epoch.
|
||||
# Corresponds to the JSON property `created`
|
||||
# @return [DateTime]
|
||||
attr_accessor :created
|
||||
|
||||
# The display name.
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# The identifier for this User.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# The kind of this entity. Always blogger#user
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# This user's locale
|
||||
# Corresponds to the JSON property `locale`
|
||||
# @return [Google::Apis::BloggerV2::User::Locale]
|
||||
attr_accessor :locale
|
||||
|
||||
# The API REST URL to fetch this resource from.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# The user's profile page.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@about = args[:about] if args.key?(:about)
|
||||
@blogs = args[:blogs] if args.key?(:blogs)
|
||||
@created = args[:created] if args.key?(:created)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@locale = args[:locale] if args.key?(:locale)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
|
||||
# The container of blogs for this user.
|
||||
class Blogs
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The URL of the Blogs for this user.
|
||||
# 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)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
end
|
||||
end
|
||||
|
||||
# This user's locale
|
||||
class Locale
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The user's country setting.
|
||||
# Corresponds to the JSON property `country`
|
||||
# @return [String]
|
||||
attr_accessor :country
|
||||
|
||||
# The user's language setting.
|
||||
# Corresponds to the JSON property `language`
|
||||
# @return [String]
|
||||
attr_accessor :language
|
||||
|
||||
# The user's language variant setting.
|
||||
# Corresponds to the JSON property `variant`
|
||||
# @return [String]
|
||||
attr_accessor :variant
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@country = args[:country] if args.key?(:country)
|
||||
@language = args[:language] if args.key?(:language)
|
||||
@variant = args[:variant] if args.key?(:variant)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,465 @@
|
|||
# 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 BloggerV2
|
||||
|
||||
class Blog
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Locale
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Pages
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Posts
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BlogList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Comment
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Author
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Image
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Blog
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class InReplyTo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Post
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CommentList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Page
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Author
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Image
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Blog
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PageList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Post
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Author
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Image
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Blog
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Replies
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PostList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class User
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Blogs
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Locale
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Blog
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :description, as: 'description'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :locale, as: 'locale', class: Google::Apis::BloggerV2::Blog::Locale, decorator: Google::Apis::BloggerV2::Blog::Locale::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
property :pages, as: 'pages', class: Google::Apis::BloggerV2::Blog::Pages, decorator: Google::Apis::BloggerV2::Blog::Pages::Representation
|
||||
|
||||
property :posts, as: 'posts', class: Google::Apis::BloggerV2::Blog::Posts, decorator: Google::Apis::BloggerV2::Blog::Posts::Representation
|
||||
|
||||
property :published, as: 'published', type: DateTime
|
||||
|
||||
property :self_link, as: 'selfLink'
|
||||
property :updated, as: 'updated', type: DateTime
|
||||
|
||||
property :url, as: 'url'
|
||||
end
|
||||
|
||||
class Locale
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :country, as: 'country'
|
||||
property :language, as: 'language'
|
||||
property :variant, as: 'variant'
|
||||
end
|
||||
end
|
||||
|
||||
class Pages
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :self_link, as: 'selfLink'
|
||||
property :total_items, as: 'totalItems'
|
||||
end
|
||||
end
|
||||
|
||||
class Posts
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :self_link, as: 'selfLink'
|
||||
property :total_items, as: 'totalItems'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class BlogList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::BloggerV2::Blog, decorator: Google::Apis::BloggerV2::Blog::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class Comment
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :author, as: 'author', class: Google::Apis::BloggerV2::Comment::Author, decorator: Google::Apis::BloggerV2::Comment::Author::Representation
|
||||
|
||||
property :blog, as: 'blog', class: Google::Apis::BloggerV2::Comment::Blog, decorator: Google::Apis::BloggerV2::Comment::Blog::Representation
|
||||
|
||||
property :content, as: 'content'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :in_reply_to, as: 'inReplyTo', class: Google::Apis::BloggerV2::Comment::InReplyTo, decorator: Google::Apis::BloggerV2::Comment::InReplyTo::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :post, as: 'post', class: Google::Apis::BloggerV2::Comment::Post, decorator: Google::Apis::BloggerV2::Comment::Post::Representation
|
||||
|
||||
property :published, as: 'published', type: DateTime
|
||||
|
||||
property :self_link, as: 'selfLink'
|
||||
property :updated, as: 'updated', type: DateTime
|
||||
|
||||
end
|
||||
|
||||
class Author
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :display_name, as: 'displayName'
|
||||
property :id, as: 'id'
|
||||
property :image, as: 'image', class: Google::Apis::BloggerV2::Comment::Author::Image, decorator: Google::Apis::BloggerV2::Comment::Author::Image::Representation
|
||||
|
||||
property :url, as: 'url'
|
||||
end
|
||||
|
||||
class Image
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Blog
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
end
|
||||
end
|
||||
|
||||
class InReplyTo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
end
|
||||
end
|
||||
|
||||
class Post
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class CommentList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::BloggerV2::Comment, decorator: Google::Apis::BloggerV2::Comment::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :prev_page_token, as: 'prevPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class Page
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :author, as: 'author', class: Google::Apis::BloggerV2::Page::Author, decorator: Google::Apis::BloggerV2::Page::Author::Representation
|
||||
|
||||
property :blog, as: 'blog', class: Google::Apis::BloggerV2::Page::Blog, decorator: Google::Apis::BloggerV2::Page::Blog::Representation
|
||||
|
||||
property :content, as: 'content'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :published, as: 'published', type: DateTime
|
||||
|
||||
property :self_link, as: 'selfLink'
|
||||
property :title, as: 'title'
|
||||
property :updated, as: 'updated', type: DateTime
|
||||
|
||||
property :url, as: 'url'
|
||||
end
|
||||
|
||||
class Author
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :display_name, as: 'displayName'
|
||||
property :id, as: 'id'
|
||||
property :image, as: 'image', class: Google::Apis::BloggerV2::Page::Author::Image, decorator: Google::Apis::BloggerV2::Page::Author::Image::Representation
|
||||
|
||||
property :url, as: 'url'
|
||||
end
|
||||
|
||||
class Image
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Blog
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class PageList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::BloggerV2::Page, decorator: Google::Apis::BloggerV2::Page::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
end
|
||||
end
|
||||
|
||||
class Post
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :author, as: 'author', class: Google::Apis::BloggerV2::Post::Author, decorator: Google::Apis::BloggerV2::Post::Author::Representation
|
||||
|
||||
property :blog, as: 'blog', class: Google::Apis::BloggerV2::Post::Blog, decorator: Google::Apis::BloggerV2::Post::Blog::Representation
|
||||
|
||||
property :content, as: 'content'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
collection :labels, as: 'labels'
|
||||
property :published, as: 'published', type: DateTime
|
||||
|
||||
property :replies, as: 'replies', class: Google::Apis::BloggerV2::Post::Replies, decorator: Google::Apis::BloggerV2::Post::Replies::Representation
|
||||
|
||||
property :self_link, as: 'selfLink'
|
||||
property :title, as: 'title'
|
||||
property :updated, as: 'updated', type: DateTime
|
||||
|
||||
property :url, as: 'url'
|
||||
end
|
||||
|
||||
class Author
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :display_name, as: 'displayName'
|
||||
property :id, as: 'id'
|
||||
property :image, as: 'image', class: Google::Apis::BloggerV2::Post::Author::Image, decorator: Google::Apis::BloggerV2::Post::Author::Image::Representation
|
||||
|
||||
property :url, as: 'url'
|
||||
end
|
||||
|
||||
class Image
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Blog
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
end
|
||||
end
|
||||
|
||||
class Replies
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :self_link, as: 'selfLink'
|
||||
property :total_items, :numeric_string => true, as: 'totalItems'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class PostList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :items, as: 'items', class: Google::Apis::BloggerV2::Post, decorator: Google::Apis::BloggerV2::Post::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :prev_page_token, as: 'prevPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class User
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :about, as: 'about'
|
||||
property :blogs, as: 'blogs', class: Google::Apis::BloggerV2::User::Blogs, decorator: Google::Apis::BloggerV2::User::Blogs::Representation
|
||||
|
||||
property :created, as: 'created', type: DateTime
|
||||
|
||||
property :display_name, as: 'displayName'
|
||||
property :id, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :locale, as: 'locale', class: Google::Apis::BloggerV2::User::Locale, decorator: Google::Apis::BloggerV2::User::Locale::Representation
|
||||
|
||||
property :self_link, as: 'selfLink'
|
||||
property :url, as: 'url'
|
||||
end
|
||||
|
||||
class Blogs
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class Locale
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :country, as: 'country'
|
||||
property :language, as: 'language'
|
||||
property :variant, as: 'variant'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,424 @@
|
|||
# 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 BloggerV2
|
||||
# Blogger API
|
||||
#
|
||||
# API for access to the data within Blogger.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/blogger_v2'
|
||||
#
|
||||
# Blogger = Google::Apis::BloggerV2 # Alias the module
|
||||
# service = Blogger::BloggerService.new
|
||||
#
|
||||
# @see https://developers.google.com/blogger/docs/2.0/json/getting_started
|
||||
class BloggerService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'blogger/v2/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Gets one blog by id.
|
||||
# @param [String] blog_id
|
||||
# The ID of the blog 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.
|
||||
# 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::BloggerV2::Blog] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::Blog]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_blog(blog_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'blogs/{blogId}', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::Blog::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::Blog
|
||||
command.params['blogId'] = blog_id unless blog_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets one comment by id.
|
||||
# @param [String] blog_id
|
||||
# ID of the blog to containing the comment.
|
||||
# @param [String] post_id
|
||||
# ID of the post to fetch posts from.
|
||||
# @param [String] comment_id
|
||||
# The ID of the comment 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.
|
||||
# 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::BloggerV2::Comment] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::Comment]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'blogs/{blogId}/posts/{postId}/comments/{commentId}', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::Comment::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::Comment
|
||||
command.params['blogId'] = blog_id unless blog_id.nil?
|
||||
command.params['postId'] = post_id unless post_id.nil?
|
||||
command.params['commentId'] = comment_id unless comment_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves the comments for a blog, possibly filtered.
|
||||
# @param [String] blog_id
|
||||
# ID of the blog to fetch comments from.
|
||||
# @param [String] post_id
|
||||
# ID of the post to fetch posts from.
|
||||
# @param [Boolean] fetch_bodies
|
||||
# Whether the body content of the comments is included.
|
||||
# @param [Fixnum] max_results
|
||||
# Maximum number of comments to include in the result.
|
||||
# @param [String] page_token
|
||||
# Continuation token if request is paged.
|
||||
# @param [DateTime] start_date
|
||||
# Earliest date of comment to fetch, a date-time with RFC 3339 formatting.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::BloggerV2::CommentList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::CommentList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_comments(blog_id, post_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'blogs/{blogId}/posts/{postId}/comments', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::CommentList::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::CommentList
|
||||
command.params['blogId'] = blog_id unless blog_id.nil?
|
||||
command.params['postId'] = post_id unless post_id.nil?
|
||||
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['startDate'] = start_date unless start_date.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
|
||||
|
||||
# Gets one blog page by id.
|
||||
# @param [String] blog_id
|
||||
# ID of the blog containing the page.
|
||||
# @param [String] page_id
|
||||
# The ID of the page 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.
|
||||
# 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::BloggerV2::Page] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::Page]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'blogs/{blogId}/pages/{pageId}', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::Page::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::Page
|
||||
command.params['blogId'] = blog_id unless blog_id.nil?
|
||||
command.params['pageId'] = page_id unless page_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves pages for a blog, possibly filtered.
|
||||
# @param [String] blog_id
|
||||
# ID of the blog to fetch pages from.
|
||||
# @param [Boolean] fetch_bodies
|
||||
# Whether to retrieve the Page bodies.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::BloggerV2::PageList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::PageList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_pages(blog_id, fetch_bodies: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'blogs/{blogId}/pages', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::PageList::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::PageList
|
||||
command.params['blogId'] = blog_id unless blog_id.nil?
|
||||
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.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
|
||||
|
||||
# Get a post by id.
|
||||
# @param [String] blog_id
|
||||
# ID of the blog to fetch the post from.
|
||||
# @param [String] post_id
|
||||
# The ID of the post
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::BloggerV2::Post] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::Post]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_post(blog_id, post_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'blogs/{blogId}/posts/{postId}', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::Post::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::Post
|
||||
command.params['blogId'] = blog_id unless blog_id.nil?
|
||||
command.params['postId'] = post_id unless post_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves a list of posts, possibly filtered.
|
||||
# @param [String] blog_id
|
||||
# ID of the blog to fetch posts from.
|
||||
# @param [Boolean] fetch_bodies
|
||||
# Whether the body content of posts is included.
|
||||
# @param [Fixnum] max_results
|
||||
# Maximum number of posts to fetch.
|
||||
# @param [String] page_token
|
||||
# Continuation token if the request is paged.
|
||||
# @param [DateTime] start_date
|
||||
# Earliest post date to fetch, a date-time with RFC 3339 formatting.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::BloggerV2::PostList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::PostList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_posts(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'blogs/{blogId}/posts', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::PostList::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::PostList
|
||||
command.params['blogId'] = blog_id unless blog_id.nil?
|
||||
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
|
||||
command.query['maxResults'] = max_results unless max_results.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['startDate'] = start_date unless start_date.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
|
||||
|
||||
# Gets one user by id.
|
||||
# @param [String] user_id
|
||||
# The ID of the user 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.
|
||||
# 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::BloggerV2::User] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::User]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'users/{userId}', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::User::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::User
|
||||
command.params['userId'] = user_id unless user_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves a list of blogs, possibly filtered.
|
||||
# @param [String] user_id
|
||||
# ID of the user whose blogs are to be fetched. Either the word 'self' (sans
|
||||
# quote marks) or the user's profile identifier.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::BloggerV2::BlogList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::BloggerV2::BlogList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_blogs(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'users/{userId}/blogs', options)
|
||||
command.response_representation = Google::Apis::BloggerV2::BlogList::Representation
|
||||
command.response_class = Google::Apis::BloggerV2::BlogList
|
||||
command.params['userId'] = user_id unless user_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -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/cloudfunctions_v1beta2/service.rb'
|
||||
require 'google/apis/cloudfunctions_v1beta2/classes.rb'
|
||||
require 'google/apis/cloudfunctions_v1beta2/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Cloud Functions API
|
||||
#
|
||||
# API for managing lightweight user-provided functions executed in response to
|
||||
# events.
|
||||
#
|
||||
# @see https://cloud.google.com/functions
|
||||
module CloudfunctionsV1beta2
|
||||
VERSION = 'V1beta2'
|
||||
REVISION = '20170822'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,678 @@
|
|||
# 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 CloudfunctionsV1beta2
|
||||
|
||||
# Request for the `CallFunction` method.
|
||||
class CallFunctionRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Input to be passed to the function.
|
||||
# Corresponds to the JSON property `data`
|
||||
# @return [String]
|
||||
attr_accessor :data
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@data = args[:data] if args.key?(:data)
|
||||
end
|
||||
end
|
||||
|
||||
# Response of `CallFunction` method.
|
||||
class CallFunctionResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Either system or user-function generated error. Set if execution
|
||||
# was not successful.
|
||||
# Corresponds to the JSON property `error`
|
||||
# @return [String]
|
||||
attr_accessor :error
|
||||
|
||||
# Execution id of function invocation.
|
||||
# Corresponds to the JSON property `executionId`
|
||||
# @return [String]
|
||||
attr_accessor :execution_id
|
||||
|
||||
# Result populated for successful execution of synchronous function. Will
|
||||
# not be populated if function does not return a result through context.
|
||||
# Corresponds to the JSON property `result`
|
||||
# @return [String]
|
||||
attr_accessor :result
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@error = args[:error] if args.key?(:error)
|
||||
@execution_id = args[:execution_id] if args.key?(:execution_id)
|
||||
@result = args[:result] if args.key?(:result)
|
||||
end
|
||||
end
|
||||
|
||||
# Describes a Cloud Function that contains user computation executed in
|
||||
# response to an event. It encapsulate function and triggers configurations.
|
||||
class CloudFunction
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The amount of memory in MB available for a function.
|
||||
# Defaults to 256MB.
|
||||
# Corresponds to the JSON property `availableMemoryMb`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :available_memory_mb
|
||||
|
||||
# The name of the function (as defined in source code) that will be
|
||||
# executed. Defaults to the resource name suffix, if not specified. For
|
||||
# backward compatibility, if function with given name is not found, then the
|
||||
# system will try to use function named "function".
|
||||
# For Node.js this is name of a function exported by the module specified
|
||||
# in `source_location`.
|
||||
# Corresponds to the JSON property `entryPoint`
|
||||
# @return [String]
|
||||
attr_accessor :entry_point
|
||||
|
||||
# Describes EventTrigger, used to request events be sent from another
|
||||
# service.
|
||||
# Corresponds to the JSON property `eventTrigger`
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::EventTrigger]
|
||||
attr_accessor :event_trigger
|
||||
|
||||
# Describes HTTPSTrigger, could be used to connect web hooks to function.
|
||||
# Corresponds to the JSON property `httpsTrigger`
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::HttpsTrigger]
|
||||
attr_accessor :https_trigger
|
||||
|
||||
# Output only. Name of the most recent operation modifying the function. If
|
||||
# the function status is `DEPLOYING` or `DELETING`, then it points to the
|
||||
# active operation.
|
||||
# Corresponds to the JSON property `latestOperation`
|
||||
# @return [String]
|
||||
attr_accessor :latest_operation
|
||||
|
||||
# A user-defined name of the function. Function names must be unique
|
||||
# globally and match pattern `projects/*/locations/*/functions/*`
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# Output only. The service account of the function.
|
||||
# Corresponds to the JSON property `serviceAccount`
|
||||
# @return [String]
|
||||
attr_accessor :service_account
|
||||
|
||||
# The Google Cloud Storage URL, starting with gs://, pointing to the zip
|
||||
# archive which contains the function.
|
||||
# Corresponds to the JSON property `sourceArchiveUrl`
|
||||
# @return [String]
|
||||
attr_accessor :source_archive_url
|
||||
|
||||
# Describes the location of the function source in a remote repository.
|
||||
# Corresponds to the JSON property `sourceRepository`
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::SourceRepository]
|
||||
attr_accessor :source_repository
|
||||
|
||||
# The URL pointing to the hosted repository where the function is defined.
|
||||
# There are supported Cloud Source Repository URLs in the following
|
||||
# formats:
|
||||
# To refer to a specific commit:
|
||||
# `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
|
||||
# To refer to a moveable alias (branch):
|
||||
# `https://source.developers.google.com/projects/*/repos/*/aliases/movable/*/
|
||||
# paths/*`
|
||||
# In particular, to refer to HEAD use `master` moveable alias.
|
||||
# To refer to a specific fixed alias (tag):
|
||||
# `https://source.developers.google.com/projects/*/repos/*/aliases/fixed/*/paths/
|
||||
# *`
|
||||
# You may omit `paths/*` if you want to use the main directory.
|
||||
# Corresponds to the JSON property `sourceRepositoryUrl`
|
||||
# @return [String]
|
||||
attr_accessor :source_repository_url
|
||||
|
||||
# Output only. Status of the function deployment.
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
# The function execution timeout. Execution is considered failed and
|
||||
# can be terminated if the function is not completed at the end of the
|
||||
# timeout period. Defaults to 60 seconds.
|
||||
# Corresponds to the JSON property `timeout`
|
||||
# @return [String]
|
||||
attr_accessor :timeout
|
||||
|
||||
# Output only. The last update timestamp of a Cloud Function.
|
||||
# Corresponds to the JSON property `updateTime`
|
||||
# @return [String]
|
||||
attr_accessor :update_time
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@available_memory_mb = args[:available_memory_mb] if args.key?(:available_memory_mb)
|
||||
@entry_point = args[:entry_point] if args.key?(:entry_point)
|
||||
@event_trigger = args[:event_trigger] if args.key?(:event_trigger)
|
||||
@https_trigger = args[:https_trigger] if args.key?(:https_trigger)
|
||||
@latest_operation = args[:latest_operation] if args.key?(:latest_operation)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@service_account = args[:service_account] if args.key?(:service_account)
|
||||
@source_archive_url = args[:source_archive_url] if args.key?(:source_archive_url)
|
||||
@source_repository = args[:source_repository] if args.key?(:source_repository)
|
||||
@source_repository_url = args[:source_repository_url] if args.key?(:source_repository_url)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
@timeout = args[:timeout] if args.key?(:timeout)
|
||||
@update_time = args[:update_time] if args.key?(:update_time)
|
||||
end
|
||||
end
|
||||
|
||||
# Describes EventTrigger, used to request events be sent from another
|
||||
# service.
|
||||
class EventTrigger
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# `event_type` names contain the service that is sending an event and the
|
||||
# kind of event that was fired. Must be of the form
|
||||
# `providers/*/eventTypes/*` e.g. Directly handle a Message published to
|
||||
# Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`
|
||||
# Handle an object changing in Google Cloud Storage
|
||||
# `providers/cloud.storage/eventTypes/object.change`
|
||||
# Handle a write to the Firebase Realtime Database
|
||||
# `providers/firebase.database/eventTypes/data.write`
|
||||
# Corresponds to the JSON property `eventType`
|
||||
# @return [String]
|
||||
attr_accessor :event_type
|
||||
|
||||
# Describes the policy in case of function's execution failure.
|
||||
# If empty, then defaults to ignoring failures (i.e. not retrying them).
|
||||
# Corresponds to the JSON property `failurePolicy`
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::FailurePolicy]
|
||||
attr_accessor :failure_policy
|
||||
|
||||
# Which instance of the source's service should send events. E.g. for Pub/Sub
|
||||
# this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
|
||||
# Storage this would be a bucket at `projects/*/buckets/*`. For any source
|
||||
# that only supports one instance per-project, this should be the name of the
|
||||
# project (`projects/*`)
|
||||
# Corresponds to the JSON property `resource`
|
||||
# @return [String]
|
||||
attr_accessor :resource
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@event_type = args[:event_type] if args.key?(:event_type)
|
||||
@failure_policy = args[:failure_policy] if args.key?(:failure_policy)
|
||||
@resource = args[:resource] if args.key?(:resource)
|
||||
end
|
||||
end
|
||||
|
||||
# Describes the policy in case of function's execution failure.
|
||||
# If empty, then defaults to ignoring failures (i.e. not retrying them).
|
||||
class FailurePolicy
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Describes the retry policy in case of function's execution failure.
|
||||
# A function execution will be retried on any failure.
|
||||
# A failed execution will be retried up to 7 days with an exponential backoff
|
||||
# (capped at 10 seconds).
|
||||
# Retried execution is charged as any other execution.
|
||||
# Corresponds to the JSON property `retry`
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::Retry]
|
||||
attr_accessor :retry
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@retry = args[:retry] if args.key?(:retry)
|
||||
end
|
||||
end
|
||||
|
||||
# Describes HTTPSTrigger, could be used to connect web hooks to function.
|
||||
class HttpsTrigger
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Output only. The deployed url for the function.
|
||||
# Corresponds to the JSON property `url`
|
||||
# @return [String]
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@url = args[:url] if args.key?(:url)
|
||||
end
|
||||
end
|
||||
|
||||
# Response for the `ListFunctions` method.
|
||||
class ListFunctionsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The functions that match the request.
|
||||
# Corresponds to the JSON property `functions`
|
||||
# @return [Array<Google::Apis::CloudfunctionsV1beta2::CloudFunction>]
|
||||
attr_accessor :functions
|
||||
|
||||
# If not empty, indicates that there may be more functions that match
|
||||
# the request; this value should be passed in a new
|
||||
# google.cloud.functions.v1beta2.ListFunctionsRequest
|
||||
# to get more functions.
|
||||
# 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)
|
||||
@functions = args[:functions] if args.key?(:functions)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for Locations.ListLocations.
|
||||
class ListLocationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of locations that matches the specified filter in the request.
|
||||
# Corresponds to the JSON property `locations`
|
||||
# @return [Array<Google::Apis::CloudfunctionsV1beta2::Location>]
|
||||
attr_accessor :locations
|
||||
|
||||
# The standard List next-page token.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@locations = args[:locations] if args.key?(:locations)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for Operations.ListOperations.
|
||||
class ListOperationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The standard List next-page token.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# A list of operations that matches the specified filter in the request.
|
||||
# Corresponds to the JSON property `operations`
|
||||
# @return [Array<Google::Apis::CloudfunctionsV1beta2::Operation>]
|
||||
attr_accessor :operations
|
||||
|
||||
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)
|
||||
@operations = args[:operations] if args.key?(:operations)
|
||||
end
|
||||
end
|
||||
|
||||
# A resource that represents Google Cloud Platform location.
|
||||
class Location
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Cross-service attributes for the location. For example
|
||||
# `"cloud.googleapis.com/region": "us-east1"`
|
||||
# Corresponds to the JSON property `labels`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :labels
|
||||
|
||||
# The canonical id for this location. For example: `"us-east1"`.
|
||||
# Corresponds to the JSON property `locationId`
|
||||
# @return [String]
|
||||
attr_accessor :location_id
|
||||
|
||||
# Service-specific metadata. For example the available capacity at the given
|
||||
# location.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# Resource name for the location, which may vary between implementations.
|
||||
# For example: `"projects/example-project/locations/us-east1"`
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@labels = args[:labels] if args.key?(:labels)
|
||||
@location_id = args[:location_id] if args.key?(:location_id)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
# This resource represents a long-running operation that is the result of a
|
||||
# network API call.
|
||||
class Operation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# If the value is `false`, it means the operation is still in progress.
|
||||
# If true, the operation is completed, and either `error` or `response` is
|
||||
# available.
|
||||
# Corresponds to the JSON property `done`
|
||||
# @return [Boolean]
|
||||
attr_accessor :done
|
||||
alias_method :done?, :done
|
||||
|
||||
# The `Status` type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by
|
||||
# [gRPC](https://github.com/grpc). 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` that 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.
|
||||
# - 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::CloudfunctionsV1beta2::Status]
|
||||
attr_accessor :error
|
||||
|
||||
# Service-specific metadata associated with the operation. It typically
|
||||
# contains progress information and common metadata such as create time.
|
||||
# Some services might not provide such metadata. Any method that returns a
|
||||
# long-running operation should document the metadata type, if any.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# The server-assigned name, which is only unique within the same service that
|
||||
# originally returns it. If you use the default HTTP mapping, the
|
||||
# `name` should have the format of `operations/some/unique/name`.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The normal response of the operation in case of success. If the original
|
||||
# method returns no data on success, such as `Delete`, the response is
|
||||
# `google.protobuf.Empty`. If the original method is standard
|
||||
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
||||
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
||||
# is the original method name. For example, if the original method name
|
||||
# is `TakeSnapshot()`, the inferred response type is
|
||||
# `TakeSnapshotResponse`.
|
||||
# Corresponds to the JSON property `response`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :response
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@done = args[:done] if args.key?(:done)
|
||||
@error = args[:error] if args.key?(:error)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@response = args[:response] if args.key?(:response)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata describing an Operation
|
||||
class OperationMetadataV1Beta2
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The original request that started the operation.
|
||||
# Corresponds to the JSON property `request`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :request
|
||||
|
||||
# Target of the operation - for example
|
||||
# projects/project-1/locations/region-1/functions/function-1
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# Type of operation.
|
||||
# Corresponds to the JSON property `type`
|
||||
# @return [String]
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@request = args[:request] if args.key?(:request)
|
||||
@target = args[:target] if args.key?(:target)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
end
|
||||
end
|
||||
|
||||
# Describes the retry policy in case of function's execution failure.
|
||||
# A function execution will be retried on any failure.
|
||||
# A failed execution will be retried up to 7 days with an exponential backoff
|
||||
# (capped at 10 seconds).
|
||||
# Retried execution is charged as any other execution.
|
||||
class Retry
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Describes the location of the function source in a remote repository.
|
||||
class SourceRepository
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The name of the branch from which the function should be fetched.
|
||||
# Corresponds to the JSON property `branch`
|
||||
# @return [String]
|
||||
attr_accessor :branch
|
||||
|
||||
# Output only. The id of the revision that was resolved at the moment of
|
||||
# function creation or update. For example when a user deployed from a
|
||||
# branch, it will be the revision id of the latest change on this branch at
|
||||
# that time. If user deployed from revision then this value will be always
|
||||
# equal to the revision specified by the user.
|
||||
# Corresponds to the JSON property `deployedRevision`
|
||||
# @return [String]
|
||||
attr_accessor :deployed_revision
|
||||
|
||||
# URL to the hosted repository where the function is defined. Only paths in
|
||||
# https://source.developers.google.com domain are supported. The path should
|
||||
# contain the name of the repository.
|
||||
# Corresponds to the JSON property `repositoryUrl`
|
||||
# @return [String]
|
||||
attr_accessor :repository_url
|
||||
|
||||
# The id of the revision that captures the state of the repository from
|
||||
# which the function should be fetched.
|
||||
# Corresponds to the JSON property `revision`
|
||||
# @return [String]
|
||||
attr_accessor :revision
|
||||
|
||||
# The path within the repository where the function is defined. The path
|
||||
# should point to the directory where Cloud Functions files are located. Use
|
||||
# "/" if the function is defined directly in the root directory of a
|
||||
# repository.
|
||||
# Corresponds to the JSON property `sourcePath`
|
||||
# @return [String]
|
||||
attr_accessor :source_path
|
||||
|
||||
# The name of the tag that captures the state of the repository from
|
||||
# which the function should be fetched.
|
||||
# Corresponds to the JSON property `tag`
|
||||
# @return [String]
|
||||
attr_accessor :tag
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@branch = args[:branch] if args.key?(:branch)
|
||||
@deployed_revision = args[:deployed_revision] if args.key?(:deployed_revision)
|
||||
@repository_url = args[:repository_url] if args.key?(:repository_url)
|
||||
@revision = args[:revision] if args.key?(:revision)
|
||||
@source_path = args[:source_path] if args.key?(:source_path)
|
||||
@tag = args[:tag] if args.key?(:tag)
|
||||
end
|
||||
end
|
||||
|
||||
# The `Status` type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by
|
||||
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
# - 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` that 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.
|
||||
# - 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.
|
||||
class Status
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The status code, which should be an enum value of google.rpc.Code.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :code
|
||||
|
||||
# A list of messages that carry the error details. There is a common set of
|
||||
# message types for APIs to use.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Array<Hash<String,Object>>]
|
||||
attr_accessor :details
|
||||
|
||||
# A developer-facing error message, which should be in English. Any
|
||||
# user-facing error message should be localized and sent in the
|
||||
# google.rpc.Status.details field, or localized by the client.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,264 @@
|
|||
# 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 CloudfunctionsV1beta2
|
||||
|
||||
class CallFunctionRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CallFunctionResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CloudFunction
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class EventTrigger
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FailurePolicy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class HttpsTrigger
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListFunctionsResponse
|
||||
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 ListOperationsResponse
|
||||
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 Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta2
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Retry
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SourceRepository
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CallFunctionRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :data, as: 'data'
|
||||
end
|
||||
end
|
||||
|
||||
class CallFunctionResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :error, as: 'error'
|
||||
property :execution_id, as: 'executionId'
|
||||
property :result, as: 'result'
|
||||
end
|
||||
end
|
||||
|
||||
class CloudFunction
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :available_memory_mb, as: 'availableMemoryMb'
|
||||
property :entry_point, as: 'entryPoint'
|
||||
property :event_trigger, as: 'eventTrigger', class: Google::Apis::CloudfunctionsV1beta2::EventTrigger, decorator: Google::Apis::CloudfunctionsV1beta2::EventTrigger::Representation
|
||||
|
||||
property :https_trigger, as: 'httpsTrigger', class: Google::Apis::CloudfunctionsV1beta2::HttpsTrigger, decorator: Google::Apis::CloudfunctionsV1beta2::HttpsTrigger::Representation
|
||||
|
||||
property :latest_operation, as: 'latestOperation'
|
||||
property :name, as: 'name'
|
||||
property :service_account, as: 'serviceAccount'
|
||||
property :source_archive_url, as: 'sourceArchiveUrl'
|
||||
property :source_repository, as: 'sourceRepository', class: Google::Apis::CloudfunctionsV1beta2::SourceRepository, decorator: Google::Apis::CloudfunctionsV1beta2::SourceRepository::Representation
|
||||
|
||||
property :source_repository_url, as: 'sourceRepositoryUrl'
|
||||
property :status, as: 'status'
|
||||
property :timeout, as: 'timeout'
|
||||
property :update_time, as: 'updateTime'
|
||||
end
|
||||
end
|
||||
|
||||
class EventTrigger
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :event_type, as: 'eventType'
|
||||
property :failure_policy, as: 'failurePolicy', class: Google::Apis::CloudfunctionsV1beta2::FailurePolicy, decorator: Google::Apis::CloudfunctionsV1beta2::FailurePolicy::Representation
|
||||
|
||||
property :resource, as: 'resource'
|
||||
end
|
||||
end
|
||||
|
||||
class FailurePolicy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :retry, as: 'retry', class: Google::Apis::CloudfunctionsV1beta2::Retry, decorator: Google::Apis::CloudfunctionsV1beta2::Retry::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class HttpsTrigger
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :url, as: 'url'
|
||||
end
|
||||
end
|
||||
|
||||
class ListFunctionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :functions, as: 'functions', class: Google::Apis::CloudfunctionsV1beta2::CloudFunction, decorator: Google::Apis::CloudfunctionsV1beta2::CloudFunction::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListLocationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :locations, as: 'locations', class: Google::Apis::CloudfunctionsV1beta2::Location, decorator: Google::Apis::CloudfunctionsV1beta2::Location::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :operations, as: 'operations', class: Google::Apis::CloudfunctionsV1beta2::Operation, decorator: Google::Apis::CloudfunctionsV1beta2::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Location
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :labels, as: 'labels'
|
||||
property :location_id, as: 'locationId'
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
property :error, as: 'error', class: Google::Apis::CloudfunctionsV1beta2::Status, decorator: Google::Apis::CloudfunctionsV1beta2::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadataV1Beta2
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :request, as: 'request'
|
||||
property :target, as: 'target'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
end
|
||||
|
||||
class Retry
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class SourceRepository
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :branch, as: 'branch'
|
||||
property :deployed_revision, as: 'deployedRevision'
|
||||
property :repository_url, as: 'repositoryUrl'
|
||||
property :revision, as: 'revision'
|
||||
property :source_path, as: 'sourcePath'
|
||||
property :tag, as: 'tag'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,385 @@
|
|||
# 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 CloudfunctionsV1beta2
|
||||
# Google Cloud Functions API
|
||||
#
|
||||
# API for managing lightweight user-provided functions executed in response to
|
||||
# events.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/cloudfunctions_v1beta2'
|
||||
#
|
||||
# Cloudfunctions = Google::Apis::CloudfunctionsV1beta2 # Alias the module
|
||||
# service = Cloudfunctions::CloudFunctionsService.new
|
||||
#
|
||||
# @see https://cloud.google.com/functions
|
||||
class CloudFunctionsService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://cloudfunctions.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
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::CloudfunctionsV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::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, 'v1beta2/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::Operation
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists operations that match the specified filter in the request. If the
|
||||
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
||||
# NOTE: the `name` binding allows API services to override the binding
|
||||
# to use different resource name schemes, such as `users/*/operations`. To
|
||||
# override the binding, API services can add a binding such as
|
||||
# `"/v1/`name=users/*`/operations"` to their service configuration.
|
||||
# For backwards compatibility, the default name includes the operations
|
||||
# collection id, however overriding users must ensure the name binding
|
||||
# is the parent resource, without the operations collection id.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [String] name
|
||||
# The name of the operation's parent resource.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudfunctionsV1beta2::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/operations', options)
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::ListOperationsResponse
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['name'] = name unless name.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
|
||||
|
||||
# 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 [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudfunctionsV1beta2::ListLocationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::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_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/{+name}/locations', options)
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::ListLocationsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::ListLocationsResponse
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Invokes synchronously deployed function. To be used for testing, very
|
||||
# limited traffic allowed.
|
||||
# @param [String] name
|
||||
# The name of the function to be called.
|
||||
# @param [Google::Apis::CloudfunctionsV1beta2::CallFunctionRequest] call_function_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::CloudfunctionsV1beta2::CallFunctionResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::CallFunctionResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def call_function(name, call_function_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta2/{+name}:call', options)
|
||||
command.request_representation = Google::Apis::CloudfunctionsV1beta2::CallFunctionRequest::Representation
|
||||
command.request_object = call_function_request_object
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::CallFunctionResponse::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::CallFunctionResponse
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates a new function. If a function with the given name already exists in
|
||||
# the specified project, the long running operation will return
|
||||
# `ALREADY_EXISTS` error.
|
||||
# @param [String] location
|
||||
# The project and location in which the function should be created, specified
|
||||
# in the format `projects/*/locations/*`
|
||||
# @param [Google::Apis::CloudfunctionsV1beta2::CloudFunction] cloud_function_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::CloudfunctionsV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::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_location_function(location, cloud_function_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta2/{+location}/functions', options)
|
||||
command.request_representation = Google::Apis::CloudfunctionsV1beta2::CloudFunction::Representation
|
||||
command.request_object = cloud_function_object
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::Operation
|
||||
command.params['location'] = location unless location.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes a function with the given name from the specified project. If the
|
||||
# given function is used by some trigger, the trigger will be updated to
|
||||
# remove this function.
|
||||
# @param [String] name
|
||||
# The name of the function which should be deleted.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudfunctionsV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::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_project_location_function(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta2/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::Operation
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns a function with the given name from the requested project.
|
||||
# @param [String] name
|
||||
# The name of the function which details should be obtained.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::CloudfunctionsV1beta2::CloudFunction] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::CloudFunction]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_function(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::CloudFunction::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::CloudFunction
|
||||
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 a list of functions that belong to the requested project.
|
||||
# @param [String] location
|
||||
# The project and location from which the function should be listed,
|
||||
# specified in the format `projects/*/locations/*`
|
||||
# If you want to list functions in all locations, use "-" in place of a
|
||||
# location.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of functions to return per call.
|
||||
# @param [String] page_token
|
||||
# The value returned by the last
|
||||
# `ListFunctionsResponse`; indicates that
|
||||
# this is a continuation of a prior `ListFunctions` call, and that the
|
||||
# system should return the next page of data.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::CloudfunctionsV1beta2::ListFunctionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::ListFunctionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_functions(location, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/{+location}/functions', options)
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::ListFunctionsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::ListFunctionsResponse
|
||||
command.params['location'] = location unless location.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates existing function.
|
||||
# @param [String] name
|
||||
# The name of the function to be updated.
|
||||
# @param [Google::Apis::CloudfunctionsV1beta2::CloudFunction] cloud_function_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::CloudfunctionsV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudfunctionsV1beta2::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_project_location_function(name, cloud_function_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'v1beta2/{+name}', options)
|
||||
command.request_representation = Google::Apis::CloudfunctionsV1beta2::CloudFunction::Representation
|
||||
command.request_object = cloud_function_object
|
||||
command.response_representation = Google::Apis::CloudfunctionsV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudfunctionsV1beta2::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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -26,7 +26,7 @@ module Google
|
|||
# @see https://cloud.google.com/resource-manager
|
||||
module CloudresourcemanagerV1beta1
|
||||
VERSION = 'V1beta1'
|
||||
REVISION = '20170705'
|
||||
REVISION = '20170821'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -22,25 +22,19 @@ module Google
|
|||
module Apis
|
||||
module CloudresourcemanagerV1beta1
|
||||
|
||||
class AuditConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Ancestor
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListOrganizationsResponse
|
||||
class AuditConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
class AuditLogConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
|
@ -58,73 +52,7 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UndeleteProjectRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Organization
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ProjectCreationStatus
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GetAncestryResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OrganizationOwner
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListProjectsResponse
|
||||
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 GetAncestryRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Project
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
class FolderOperation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
|
@ -136,7 +64,43 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FolderOperation
|
||||
class GetAncestryRequest
|
||||
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 GetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListOrganizationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListProjectsResponse
|
||||
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 OrganizationOwner
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
|
@ -148,19 +112,46 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Project
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ProjectCreationStatus
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ResourceId
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
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
|
||||
class SetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
end
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UndeleteProjectRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Ancestor
|
||||
|
@ -171,21 +162,20 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class ListOrganizationsResponse
|
||||
class AuditConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1beta1::Organization, decorator: Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
|
||||
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudresourcemanagerV1beta1::AuditLogConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::AuditLogConfig::Representation
|
||||
|
||||
property :service, as: 'service'
|
||||
end
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
class AuditLogConfig
|
||||
# @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'
|
||||
collection :exempted_members, as: 'exemptedMembers'
|
||||
property :log_type, as: 'logType'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -203,42 +193,24 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class UndeleteProjectRequest
|
||||
class FolderOperation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class Organization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_time, as: 'creationTime'
|
||||
property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
property :organization_id, as: 'organizationId'
|
||||
property :lifecycle_state, as: 'lifecycleState'
|
||||
property :destination_parent, as: 'destinationParent'
|
||||
property :display_name, as: 'displayName'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :source_parent, as: 'sourceParent'
|
||||
end
|
||||
end
|
||||
|
||||
class ProjectCreationStatus
|
||||
class FolderOperationError
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :ready, as: 'ready'
|
||||
property :gettable, as: 'gettable'
|
||||
property :create_time, as: 'createTime'
|
||||
property :error_message_id, as: 'errorMessageId'
|
||||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class GetIamPolicyRequest
|
||||
class GetAncestryRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
|
@ -252,6 +224,43 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class GetIamPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class ListOrganizationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1beta1::Organization, decorator: Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ListProjectsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1beta1::Project, decorator: Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Organization
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_time, as: 'creationTime'
|
||||
property :display_name, as: 'displayName'
|
||||
property :lifecycle_state, as: 'lifecycleState'
|
||||
property :name, as: 'name'
|
||||
property :organization_id, as: 'organizationId'
|
||||
property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class OrganizationOwner
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -259,40 +268,55 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class ListProjectsResponse
|
||||
class Policy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1beta1::Project, decorator: Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation
|
||||
|
||||
class AuditLogConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :exempted_members, as: 'exemptedMembers'
|
||||
property :log_type, as: 'logType'
|
||||
end
|
||||
end
|
||||
|
||||
class GetAncestryRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :etag, :base64 => true, as: 'etag'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class Project
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :create_time, as: 'createTime'
|
||||
hash :labels, as: 'labels'
|
||||
property :lifecycle_state, as: 'lifecycleState'
|
||||
property :project_number, :numeric_string => true, as: 'projectNumber'
|
||||
property :name, as: 'name'
|
||||
property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation
|
||||
|
||||
hash :labels, as: 'labels'
|
||||
property :create_time, as: 'createTime'
|
||||
property :name, as: 'name'
|
||||
property :project_id, as: 'projectId'
|
||||
property :project_number, :numeric_string => true, as: 'projectNumber'
|
||||
end
|
||||
end
|
||||
|
||||
class ProjectCreationStatus
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :create_time, as: 'createTime'
|
||||
property :gettable, as: 'gettable'
|
||||
property :ready, as: 'ready'
|
||||
end
|
||||
end
|
||||
|
||||
class ResourceId
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :type, as: 'type'
|
||||
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
|
||||
|
||||
|
@ -303,40 +327,16 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class FolderOperationError
|
||||
class TestIamPermissionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :error_message_id, as: 'errorMessageId'
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class FolderOperation
|
||||
class UndeleteProjectRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :operation_type, as: 'operationType'
|
||||
property :source_parent, as: 'sourceParent'
|
||||
property :display_name, as: 'displayName'
|
||||
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::CloudresourcemanagerV1beta1::AuditConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig::Representation
|
||||
|
||||
collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ResourceId
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :type, as: 'type'
|
||||
property :id, as: 'id'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -48,116 +48,52 @@ module Google
|
|||
@batch_path = 'batch'
|
||||
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.
|
||||
# + If the project is not part of an organization, there must be at least
|
||||
# one owner who has accepted the Terms of Service (ToS) agreement in the
|
||||
# policy. Calling `setIamPolicy()` 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
|
||||
# Fetches an Organization resource identified by the specified resource name.
|
||||
# @param [String] name
|
||||
# The resource name of the Organization to fetch, e.g. "organizations/1234".
|
||||
# @param [String] organization_id
|
||||
# The id of the Organization resource to fetch.
|
||||
# This field is deprecated and will be removed in v1. Use name instead.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
|
||||
# @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 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?
|
||||
def get_organization(name, organization_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['organizationId'] = organization_id unless organization_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates a Project resource.
|
||||
# Initially, the Project resource is owned by its creator exclusively.
|
||||
# The creator can later grant permission to others to read or update the
|
||||
# Project.
|
||||
# Several APIs are activated automatically for the Project, including
|
||||
# Google Cloud Storage.
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
|
||||
# @param [Boolean] use_legacy_stack
|
||||
# A safety hatch to opt out of the new reliable project creation process.
|
||||
# @param [String] quota_user
|
||||
# Available to 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.
|
||||
# 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] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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
|
||||
#
|
||||
|
@ -170,172 +106,116 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects/{resource}:getIamPolicy', options)
|
||||
def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
|
||||
command.request_object = get_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Restores the Project identified by the specified
|
||||
# `project_id` (for example, `my-project-123`).
|
||||
# You can only use this method for a Project that has a lifecycle state of
|
||||
# DELETE_REQUESTED.
|
||||
# After deletion starts, the Project cannot be restored.
|
||||
# The caller must have modify permissions for this Project.
|
||||
# @param [String] project_id
|
||||
# The project ID (for example, `foo-bar-123`).
|
||||
# Required.
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_request_object
|
||||
# Lists Organization resources that are visible to the user and satisfy
|
||||
# the specified filter. This method returns Organizations in an unspecified
|
||||
# order. New Organizations do not necessarily appear at the end of the list.
|
||||
# @param [String] filter
|
||||
# An optional query string used to filter the Organizations to return in
|
||||
# the response. Filter rules are case-insensitive.
|
||||
# Organizations may be filtered by `owner.directoryCustomerId` or by
|
||||
# `domain`, where the domain is a Google for Work domain, for example:
|
||||
# |Filter|Description|
|
||||
# |------|-----------|
|
||||
# |owner.directorycustomerid:123456789|Organizations with `owner.
|
||||
# directory_customer_id` equal to `123456789`.|
|
||||
# |domain:google.com|Organizations corresponding to the domain `google.com`.|
|
||||
# This field is optional.
|
||||
# @param [Fixnum] page_size
|
||||
# The maximum number of Organizations to return in the response.
|
||||
# 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] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
|
||||
# @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 undelete_project(project_id, undelete_project_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation
|
||||
command.request_object = undelete_project_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
def list_organizations(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta1/organizations', options)
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['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
|
||||
|
||||
# Retrieves the Project identified by the specified
|
||||
# `project_id` (for example, `my-project-123`).
|
||||
# The caller must have read permissions for this Project.
|
||||
# @param [String] project_id
|
||||
# The Project ID (for example, `my-project-123`).
|
||||
# Required.
|
||||
# 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] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
|
||||
# @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(project_id, quota_user: nil, fields: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options)
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets a list of ancestors in the resource hierarchy for the Project
|
||||
# identified by the specified `project_id` (for example, `my-project-123`).
|
||||
# The caller must have read permissions for this Project.
|
||||
# @param [String] project_id
|
||||
# The Project ID (for example, `my-project-123`).
|
||||
# Required.
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_request_object
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_ancestry(project_id, get_ancestry_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation
|
||||
command.request_object = get_ancestry_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the attributes of the Project identified by the specified
|
||||
# `project_id` (for example, `my-project-123`).
|
||||
# The caller must have modify permissions for this Project.
|
||||
# @param [String] project_id
|
||||
# The project ID (for example, `my-project-123`).
|
||||
# Required.
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::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 update_project(project_id, project_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
command.request_object = project_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns permissions that a caller has on the specified Project.
|
||||
# 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] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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
|
||||
#
|
||||
|
@ -348,15 +228,88 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options)
|
||||
def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: 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?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates an Organization resource identified by the specified resource name.
|
||||
# @param [String] name
|
||||
# Output Only. The resource name of the organization. This is the
|
||||
# organization's relative path in the API. Its format is
|
||||
# "organizations/[organization_id]". For example, "organizations/1234".
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::Organization] organization_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def update_organization(name, organization_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'v1beta1/{+name}', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
|
||||
command.request_object = organization_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates a Project resource.
|
||||
# Initially, the Project resource is owned by its creator exclusively.
|
||||
# The creator can later grant permission to others to read or update the
|
||||
# Project.
|
||||
# Several APIs are activated automatically for the Project, including
|
||||
# Google Cloud Storage.
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
|
||||
# @param [Boolean] use_legacy_stack
|
||||
# A safety hatch to opt out of the new reliable project creation process.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def create_project(project_object = nil, use_legacy_stack: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
command.request_object = project_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
|
||||
command.query['useLegacyStack'] = use_legacy_stack unless use_legacy_stack.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
|
@ -382,11 +335,11 @@ module Google
|
|||
# @param [String] project_id
|
||||
# The Project ID (for example, `foo-bar-123`).
|
||||
# Required.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
|
@ -399,13 +352,117 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def delete_project(project_id, quota_user: nil, fields: nil, options: nil, &block)
|
||||
def delete_project(project_id, fields: nil, quota_user: 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?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves the Project identified by the specified
|
||||
# `project_id` (for example, `my-project-123`).
|
||||
# The caller must have read permissions for this Project.
|
||||
# @param [String] project_id
|
||||
# The Project ID (for example, `my-project-123`).
|
||||
# Required.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::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 get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options)
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets a list of ancestors in the resource hierarchy for the Project
|
||||
# identified by the specified `project_id` (for example, `my-project-123`).
|
||||
# The caller must have read permissions for this Project.
|
||||
# @param [String] project_id
|
||||
# The Project ID (for example, `my-project-123`).
|
||||
# Required.
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation
|
||||
command.request_object = get_ancestry_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns the IAM access control policy for the specified Project.
|
||||
# Permission is denied if the policy or the resource does not exist.
|
||||
# @param [String] resource
|
||||
# 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] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::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, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects/{resource}:getIamPolicy', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
|
||||
command.request_object = get_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
|
@ -438,20 +495,20 @@ module Google
|
|||
# filters have been applied. If no filter is specified, the call will return
|
||||
# projects for which the user has `resourcemanager.projects.get` permissions.
|
||||
# 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] page_token
|
||||
# A pagination token returned from a previous call to ListProjects
|
||||
# that indicates from where listing should continue.
|
||||
# Optional.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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
|
||||
#
|
||||
|
@ -464,80 +521,55 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_projects(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
def list_projects(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: 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['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
|
||||
|
||||
# Lists Organization resources that are visible to the user and satisfy
|
||||
# the specified filter. This method returns Organizations in an unspecified
|
||||
# order. New Organizations do not necessarily appear at the end of the list.
|
||||
# @param [String] filter
|
||||
# An optional query string used to filter the Organizations to return in
|
||||
# the response. Filter rules are case-insensitive.
|
||||
# Organizations may be filtered by `owner.directoryCustomerId` or by
|
||||
# `domain`, where the domain is a Google for Work domain, for example:
|
||||
# |Filter|Description|
|
||||
# |------|-----------|
|
||||
# |owner.directorycustomerid:123456789|Organizations with `owner.
|
||||
# directory_customer_id` equal to `123456789`.|
|
||||
# |domain:google.com|Organizations corresponding to the domain `google.com`.|
|
||||
# This field is optional.
|
||||
# @param [String] page_token
|
||||
# A pagination token returned from a previous call to `ListOrganizations`
|
||||
# that indicates from where listing should continue.
|
||||
# This field is optional.
|
||||
# @param [Fixnum] page_size
|
||||
# The maximum number of Organizations to return in the response.
|
||||
# This field is optional.
|
||||
# @param [String] quota_user
|
||||
# Available to 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(filter: nil, page_token: nil, page_size: 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['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 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".
|
||||
# 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.
|
||||
# + If the project is not part of an organization, there must be at least
|
||||
# one owner who has accepted the Terms of Service (ToS) agreement in the
|
||||
# policy. Calling `setIamPolicy()` 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] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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
|
||||
#
|
||||
|
@ -550,135 +582,28 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def 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)
|
||||
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, '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?
|
||||
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::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".
|
||||
# Returns permissions that a caller has on the specified Project.
|
||||
# @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] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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
|
||||
#
|
||||
|
@ -691,15 +616,90 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
|
||||
def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Restores the Project identified by the specified
|
||||
# `project_id` (for example, `my-project-123`).
|
||||
# You can only use this method for a Project that has a lifecycle state of
|
||||
# DELETE_REQUESTED.
|
||||
# After deletion starts, the Project cannot be restored.
|
||||
# The caller must have modify permissions for this Project.
|
||||
# @param [String] project_id
|
||||
# The project ID (for example, `foo-bar-123`).
|
||||
# Required.
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::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 undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation
|
||||
command.request_object = undelete_project_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
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
|
||||
# `project_id` (for example, `my-project-123`).
|
||||
# The caller must have modify permissions for this Project.
|
||||
# @param [String] project_id
|
||||
# The project ID (for example, `my-project-123`).
|
||||
# Required.
|
||||
# @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
command.request_object = project_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
# 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/cloudresourcemanager_v2beta1/service.rb'
|
||||
require 'google/apis/cloudresourcemanager_v2beta1/classes.rb'
|
||||
require 'google/apis/cloudresourcemanager_v2beta1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Cloud Resource Manager API
|
||||
#
|
||||
# The Google Cloud Resource Manager API provides methods for creating, reading,
|
||||
# and updating project metadata.
|
||||
#
|
||||
# @see https://cloud.google.com/resource-manager
|
||||
module CloudresourcemanagerV2beta1
|
||||
VERSION = 'V2beta1'
|
||||
REVISION = '20170710'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,819 @@
|
|||
# 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 CloudresourcemanagerV2beta1
|
||||
|
||||
# Specifies the audit configuration for a service.
|
||||
# The configuration determines which permission types are logged, and what
|
||||
# identities, if any, are exempted from logging.
|
||||
# An AuditConfig 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
|
||||
|
||||
# The configuration for logging of each type of permission.
|
||||
# Next ID: 4
|
||||
# Corresponds to the JSON property `auditLogConfigs`
|
||||
# @return [Array<Google::Apis::CloudresourcemanagerV2beta1::AuditLogConfig>]
|
||||
attr_accessor :audit_log_configs
|
||||
|
||||
# Specifies a service that will be enabled for audit logging.
|
||||
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
|
||||
# `allServices` is a special value that covers all services.
|
||||
# Corresponds to the JSON property `service`
|
||||
# @return [String]
|
||||
attr_accessor :service
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
||||
@service = args[:service] if args.key?(:service)
|
||||
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
|
||||
|
||||
# Associates `members` with a `role`.
|
||||
class Binding
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies the identities requesting access for a Cloud Platform resource.
|
||||
# `members` can have the following values:
|
||||
# * `allUsers`: A special identifier that represents anyone who is
|
||||
# on the internet; with or without a Google account.
|
||||
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
||||
# who is authenticated with a Google account or a service account.
|
||||
# * `user:`emailid``: An email address that represents a specific Google
|
||||
# account. For example, `alice@gmail.com` or `joe@example.com`.
|
||||
# * `serviceAccount:`emailid``: An email address that represents a service
|
||||
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
||||
# * `group:`emailid``: An email address that represents a Google group.
|
||||
# For example, `admins@example.com`.
|
||||
# * `domain:`domain``: A Google Apps domain name that represents all the
|
||||
# users of that domain. For example, `google.com` or `example.com`.
|
||||
# Corresponds to the JSON property `members`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :members
|
||||
|
||||
# Role that is assigned to `members`.
|
||||
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
||||
# Required
|
||||
# Corresponds to the JSON property `role`
|
||||
# @return [String]
|
||||
attr_accessor :role
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
@role = args[:role] if args.key?(:role)
|
||||
end
|
||||
end
|
||||
|
||||
# A Folder in an Organization's resource hierarchy, used to
|
||||
# organize that Organization's resources.
|
||||
class Folder
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Output only. Timestamp when the Folder was created. Assigned by the server.
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# The folder’s display name.
|
||||
# A folder’s display name must be unique amongst its siblings, e.g.
|
||||
# no two folders with the same parent can share the same display name.
|
||||
# The display name must start and end with a letter or digit, may contain
|
||||
# letters, digits, spaces, hyphens and underscores and can be no longer
|
||||
# than 30 characters. This is captured by the regular expression:
|
||||
# [\p`L`\p`N`](`\p`L`\p`N`_- ]`0,28`[\p`L`\p`N`])?.
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# Output only. The lifecycle state of the folder.
|
||||
# Updates to the lifecycle_state must be performed via
|
||||
# [DeleteFolder] and [UndeleteFolder].
|
||||
# Corresponds to the JSON property `lifecycleState`
|
||||
# @return [String]
|
||||
attr_accessor :lifecycle_state
|
||||
|
||||
# Output only. The resource name of the Folder.
|
||||
# Its format is `folders/`folder_id``, for example: "folders/1234".
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The Folder’s parent's resource name.
|
||||
# Updates to the folder's parent must be performed via [MoveFolders].
|
||||
# Corresponds to the JSON property `parent`
|
||||
# @return [String]
|
||||
attr_accessor :parent
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@parent = args[:parent] if args.key?(:parent)
|
||||
end
|
||||
end
|
||||
|
||||
# Metadata describing a long running folder operation
|
||||
class FolderOperation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The resource name of the folder or organization we are either creating
|
||||
# the folder under or moving the folder to.
|
||||
# Corresponds to the JSON property `destinationParent`
|
||||
# @return [String]
|
||||
attr_accessor :destination_parent
|
||||
|
||||
# The display name of the folder.
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# The type of this operation.
|
||||
# Corresponds to the JSON property `operationType`
|
||||
# @return [String]
|
||||
attr_accessor :operation_type
|
||||
|
||||
# The resource name of the folder's parent.
|
||||
# Only applicable when the operation_type is MOVE.
|
||||
# Corresponds to the JSON property `sourceParent`
|
||||
# @return [String]
|
||||
attr_accessor :source_parent
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@destination_parent = args[:destination_parent] if args.key?(:destination_parent)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@operation_type = args[:operation_type] if args.key?(:operation_type)
|
||||
@source_parent = args[:source_parent] if args.key?(:source_parent)
|
||||
end
|
||||
end
|
||||
|
||||
# A classification of the Folder Operation error.
|
||||
class FolderOperationError
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The type of operation error experienced.
|
||||
# Corresponds to the JSON property `errorMessageId`
|
||||
# @return [String]
|
||||
attr_accessor :error_message_id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@error_message_id = args[:error_message_id] if args.key?(:error_message_id)
|
||||
end
|
||||
end
|
||||
|
||||
# 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
|
||||
|
||||
# The ListFolders response message.
|
||||
class ListFoldersResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A possibly paginated list of Folders that are direct descendants of
|
||||
# the specified parent resource.
|
||||
# Corresponds to the JSON property `folders`
|
||||
# @return [Array<Google::Apis::CloudresourcemanagerV2beta1::Folder>]
|
||||
attr_accessor :folders
|
||||
|
||||
# A pagination token returned from a previous call to `ListFolders`
|
||||
# that indicates from where listing should continue.
|
||||
# This field is optional.
|
||||
# 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)
|
||||
@folders = args[:folders] if args.key?(:folders)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# The MoveFolder request message.
|
||||
class MoveFolderRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The resource name of the Folder or Organization to reparent
|
||||
# the folder under.
|
||||
# Must be of the form `folders/`folder_id`` or `organizations/`org_id``.
|
||||
# Corresponds to the JSON property `destinationParent`
|
||||
# @return [String]
|
||||
attr_accessor :destination_parent
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@destination_parent = args[:destination_parent] if args.key?(:destination_parent)
|
||||
end
|
||||
end
|
||||
|
||||
# This resource represents a long-running operation that is the result of a
|
||||
# network API call.
|
||||
class Operation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# If the value is `false`, it means the operation is still in progress.
|
||||
# If true, the operation is completed, and either `error` or `response` is
|
||||
# available.
|
||||
# Corresponds to the JSON property `done`
|
||||
# @return [Boolean]
|
||||
attr_accessor :done
|
||||
alias_method :done?, :done
|
||||
|
||||
# The `Status` type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by
|
||||
# [gRPC](https://github.com/grpc). 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` that 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.
|
||||
# - 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::CloudresourcemanagerV2beta1::Status]
|
||||
attr_accessor :error
|
||||
|
||||
# Service-specific metadata associated with the operation. It typically
|
||||
# contains progress information and common metadata such as create time.
|
||||
# Some services might not provide such metadata. Any method that returns a
|
||||
# long-running operation should document the metadata type, if any.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# The server-assigned name, which is only unique within the same service that
|
||||
# originally returns it. If you use the default HTTP mapping, the
|
||||
# `name` should have the format of `operations/some/unique/name`.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The normal response of the operation in case of success. If the original
|
||||
# method returns no data on success, such as `Delete`, the response is
|
||||
# `google.protobuf.Empty`. If the original method is standard
|
||||
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
||||
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
||||
# is the original method name. For example, if the original method name
|
||||
# is `TakeSnapshot()`, the inferred response type is
|
||||
# `TakeSnapshotResponse`.
|
||||
# Corresponds to the JSON property `response`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :response
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@done = args[:done] if args.key?(:done)
|
||||
@error = args[:error] if args.key?(:error)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@response = args[:response] if args.key?(:response)
|
||||
end
|
||||
end
|
||||
|
||||
# Defines an Identity and Access Management (IAM) policy. It is used to
|
||||
# specify access control policies for Cloud Platform resources.
|
||||
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
|
||||
# `members` to a `role`, where the members can be user accounts, Google groups,
|
||||
# Google domains, and service accounts. A `role` is a named list of permissions
|
||||
# defined by IAM.
|
||||
# **Example**
|
||||
# `
|
||||
# "bindings": [
|
||||
# `
|
||||
# "role": "roles/owner",
|
||||
# "members": [
|
||||
# "user:mike@example.com",
|
||||
# "group:admins@example.com",
|
||||
# "domain:google.com",
|
||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "role": "roles/viewer",
|
||||
# "members": ["user:sean@example.com"]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM developer's guide](https://cloud.google.com/iam).
|
||||
class Policy
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies cloud audit logging configuration for this policy.
|
||||
# Corresponds to the JSON property `auditConfigs`
|
||||
# @return [Array<Google::Apis::CloudresourcemanagerV2beta1::AuditConfig>]
|
||||
attr_accessor :audit_configs
|
||||
|
||||
# Associates a list of `members` to a `role`.
|
||||
# `bindings` with no members will result in an error.
|
||||
# Corresponds to the JSON property `bindings`
|
||||
# @return [Array<Google::Apis::CloudresourcemanagerV2beta1::Binding>]
|
||||
attr_accessor :bindings
|
||||
|
||||
# `etag` is used for optimistic concurrency control as a way to help
|
||||
# prevent simultaneous updates of a policy from overwriting each other.
|
||||
# It is strongly suggested that systems make use of the `etag` in the
|
||||
# read-modify-write cycle to perform policy updates in order to avoid race
|
||||
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
|
||||
# systems are expected to put that etag in the request to `setIamPolicy` to
|
||||
# ensure that their change will be applied to the same version of the policy.
|
||||
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
|
||||
# policy is overwritten blindly.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# Version of the `Policy`. The default version is 0.
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :version
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
||||
@bindings = args[:bindings] if args.key?(:bindings)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@version = args[:version] if args.key?(:version)
|
||||
end
|
||||
end
|
||||
|
||||
# A status object which is used as the `metadata` field for the Operation
|
||||
# returned by CreateProject. It provides insight for when significant phases of
|
||||
# Project creation have completed.
|
||||
class ProjectCreationStatus
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Creation time of the project creation workflow.
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# True if the project can be retrieved using GetProject. No other operations
|
||||
# on the project are guaranteed to work until the project creation is
|
||||
# complete.
|
||||
# Corresponds to the JSON property `gettable`
|
||||
# @return [Boolean]
|
||||
attr_accessor :gettable
|
||||
alias_method :gettable?, :gettable
|
||||
|
||||
# True if the project creation process is complete.
|
||||
# Corresponds to the JSON property `ready`
|
||||
# @return [Boolean]
|
||||
attr_accessor :ready
|
||||
alias_method :ready?, :ready
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@gettable = args[:gettable] if args.key?(:gettable)
|
||||
@ready = args[:ready] if args.key?(:ready)
|
||||
end
|
||||
end
|
||||
|
||||
# The request message for searching folders.
|
||||
class SearchFoldersRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The maximum number of folders to return in the response.
|
||||
# This field is optional.
|
||||
# Corresponds to the JSON property `pageSize`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :page_size
|
||||
|
||||
# A pagination token returned from a previous call to `SearchFolders`
|
||||
# that indicates from where search should continue.
|
||||
# This field is optional.
|
||||
# Corresponds to the JSON property `pageToken`
|
||||
# @return [String]
|
||||
attr_accessor :page_token
|
||||
|
||||
# Search criteria used to select the Folders to return.
|
||||
# If no search criteria is specified then all accessible folders will be
|
||||
# returned.
|
||||
# Query expressions can be used to restrict results based upon displayName,
|
||||
# lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`
|
||||
# can be used along with the suffix wildcard symbol `*`.
|
||||
# Some example queries are:
|
||||
# |Query|Description|
|
||||
# |------|-----------|
|
||||
# |displayName=Test*|Folders whose display name starts with "Test".|
|
||||
# |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.|
|
||||
# |parent=folders/123|Folders whose parent is "folders/123".|
|
||||
# |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose
|
||||
# parent is "folders/123".|
|
||||
# Corresponds to the JSON property `query`
|
||||
# @return [String]
|
||||
attr_accessor :query
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@page_size = args[:page_size] if args.key?(:page_size)
|
||||
@page_token = args[:page_token] if args.key?(:page_token)
|
||||
@query = args[:query] if args.key?(:query)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for searching folders.
|
||||
class SearchFoldersResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A possibly paginated folder search results.
|
||||
# the specified parent resource.
|
||||
# Corresponds to the JSON property `folders`
|
||||
# @return [Array<Google::Apis::CloudresourcemanagerV2beta1::Folder>]
|
||||
attr_accessor :folders
|
||||
|
||||
# A pagination token returned from a previous call to `SearchFolders`
|
||||
# that indicates from where searching should continue.
|
||||
# This field is optional.
|
||||
# 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)
|
||||
@folders = args[:folders] if args.key?(:folders)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for `SetIamPolicy` method.
|
||||
class SetIamPolicyRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Defines an Identity and Access Management (IAM) policy. It is used to
|
||||
# specify access control policies for Cloud Platform resources.
|
||||
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
|
||||
# `members` to a `role`, where the members can be user accounts, Google groups,
|
||||
# Google domains, and service accounts. A `role` is a named list of permissions
|
||||
# defined by IAM.
|
||||
# **Example**
|
||||
# `
|
||||
# "bindings": [
|
||||
# `
|
||||
# "role": "roles/owner",
|
||||
# "members": [
|
||||
# "user:mike@example.com",
|
||||
# "group:admins@example.com",
|
||||
# "domain:google.com",
|
||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "role": "roles/viewer",
|
||||
# "members": ["user:sean@example.com"]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM developer's guide](https://cloud.google.com/iam).
|
||||
# Corresponds to the JSON property `policy`
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::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, the
|
||||
# following default mask is used:
|
||||
# paths: "bindings, etag"
|
||||
# This field is only used by Cloud IAM.
|
||||
# Corresponds to the JSON property `updateMask`
|
||||
# @return [String]
|
||||
attr_accessor :update_mask
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@policy = args[:policy] if args.key?(:policy)
|
||||
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
||||
end
|
||||
end
|
||||
|
||||
# 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` that 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.
|
||||
# - 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.
|
||||
class Status
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The status code, which should be an enum value of google.rpc.Code.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :code
|
||||
|
||||
# A list of messages that carry the error details. There is a common set of
|
||||
# message types for APIs to use.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Array<Hash<String,Object>>]
|
||||
attr_accessor :details
|
||||
|
||||
# A developer-facing error message, which should be in English. Any
|
||||
# user-facing error message should be localized and sent in the
|
||||
# google.rpc.Status.details field, or localized by the client.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for `TestIamPermissions` method.
|
||||
class TestIamPermissionsRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The set of permissions to check for the `resource`. Permissions with
|
||||
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
||||
# information see
|
||||
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
||||
# Corresponds to the JSON property `permissions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :permissions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@permissions = args[:permissions] if args.key?(:permissions)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for `TestIamPermissions` method.
|
||||
class TestIamPermissionsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
||||
# allowed.
|
||||
# Corresponds to the JSON property `permissions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :permissions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@permissions = args[:permissions] if args.key?(:permissions)
|
||||
end
|
||||
end
|
||||
|
||||
# The UndeleteFolder request message.
|
||||
class UndeleteFolderRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,304 @@
|
|||
# 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 CloudresourcemanagerV2beta1
|
||||
|
||||
class AuditConfig
|
||||
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 Binding
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Folder
|
||||
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 FolderOperationError
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListFoldersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MoveFolderRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Policy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ProjectCreationStatus
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SearchFoldersRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SearchFoldersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UndeleteFolderRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuditConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudresourcemanagerV2beta1::AuditLogConfig, decorator: Google::Apis::CloudresourcemanagerV2beta1::AuditLogConfig::Representation
|
||||
|
||||
property :service, as: 'service'
|
||||
end
|
||||
end
|
||||
|
||||
class AuditLogConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :exempted_members, as: 'exemptedMembers'
|
||||
property :log_type, as: 'logType'
|
||||
end
|
||||
end
|
||||
|
||||
class Binding
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :members, as: 'members'
|
||||
property :role, as: 'role'
|
||||
end
|
||||
end
|
||||
|
||||
class Folder
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :create_time, as: 'createTime'
|
||||
property :display_name, as: 'displayName'
|
||||
property :lifecycle_state, as: 'lifecycleState'
|
||||
property :name, as: 'name'
|
||||
property :parent, as: 'parent'
|
||||
end
|
||||
end
|
||||
|
||||
class FolderOperation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :destination_parent, as: 'destinationParent'
|
||||
property :display_name, as: 'displayName'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :source_parent, as: 'sourceParent'
|
||||
end
|
||||
end
|
||||
|
||||
class FolderOperationError
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :error_message_id, as: 'errorMessageId'
|
||||
end
|
||||
end
|
||||
|
||||
class GetIamPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class ListFoldersResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :folders, as: 'folders', class: Google::Apis::CloudresourcemanagerV2beta1::Folder, decorator: Google::Apis::CloudresourcemanagerV2beta1::Folder::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class MoveFolderRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :destination_parent, as: 'destinationParent'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
property :error, as: 'error', class: Google::Apis::CloudresourcemanagerV2beta1::Status, decorator: Google::Apis::CloudresourcemanagerV2beta1::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
class Policy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudresourcemanagerV2beta1::AuditConfig, decorator: Google::Apis::CloudresourcemanagerV2beta1::AuditConfig::Representation
|
||||
|
||||
collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV2beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV2beta1::Binding::Representation
|
||||
|
||||
property :etag, :base64 => true, as: 'etag'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class ProjectCreationStatus
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :create_time, as: 'createTime'
|
||||
property :gettable, as: 'gettable'
|
||||
property :ready, as: 'ready'
|
||||
end
|
||||
end
|
||||
|
||||
class SearchFoldersRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :page_size, as: 'pageSize'
|
||||
property :page_token, as: 'pageToken'
|
||||
property :query, as: 'query'
|
||||
end
|
||||
end
|
||||
|
||||
class SearchFoldersResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :folders, as: 'folders', class: Google::Apis::CloudresourcemanagerV2beta1::Folder, decorator: Google::Apis::CloudresourcemanagerV2beta1::Folder::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV2beta1::Policy, decorator: Google::Apis::CloudresourcemanagerV2beta1::Policy::Representation
|
||||
|
||||
property :update_mask, as: 'updateMask'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class UndeleteFolderRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,528 @@
|
|||
# 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 CloudresourcemanagerV2beta1
|
||||
# Google Cloud Resource Manager API
|
||||
#
|
||||
# The Google Cloud Resource Manager API provides methods for creating, reading,
|
||||
# and updating project metadata.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/cloudresourcemanager_v2beta1'
|
||||
#
|
||||
# Cloudresourcemanager = Google::Apis::CloudresourcemanagerV2beta1 # Alias the module
|
||||
# service = Cloudresourcemanager::CloudResourceManagerService.new
|
||||
#
|
||||
# @see https://cloud.google.com/resource-manager
|
||||
class CloudResourceManagerService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://cloudresourcemanager.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Creates a Folder in the resource hierarchy.
|
||||
# Returns an Operation which can be used to track the progress of the
|
||||
# folder creation workflow.
|
||||
# Upon success the Operation.response field will be populated with the
|
||||
# created Folder.
|
||||
# In order to succeed, the addition of this new Folder must not violate
|
||||
# the Folder naming, height or fanout constraints.
|
||||
# + The Folder's display_name must be distinct from all other Folder's that
|
||||
# share its parent.
|
||||
# + The addition of the Folder must not cause the active Folder hierarchy
|
||||
# to exceed a height of 4. Note, the full active + deleted Folder hierarchy
|
||||
# is allowed to reach a height of 8; this provides additional headroom when
|
||||
# moving folders that contain deleted folders.
|
||||
# + The addition of the Folder must not cause the total number of Folders
|
||||
# under its parent to exceed 100.
|
||||
# If the operation fails due to a folder constraint violation,
|
||||
# a PreconditionFailure explaining the violation will be returned.
|
||||
# If the failure occurs synchronously then the PreconditionFailure
|
||||
# will be returned via the Status.details field and if it occurs
|
||||
# asynchronously then the PreconditionFailure will be returned
|
||||
# via the the Operation.error field.
|
||||
# The caller must have `resourcemanager.folders.create` permission on the
|
||||
# identified parent.
|
||||
# @param [Google::Apis::CloudresourcemanagerV2beta1::Folder] folder_object
|
||||
# @param [String] parent
|
||||
# The resource name of the new Folder's parent.
|
||||
# Must be of the form `folders/`folder_id`` or `organizations/`org_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::CloudresourcemanagerV2beta1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::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_folder(folder_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/folders', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV2beta1::Folder::Representation
|
||||
command.request_object = folder_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::Operation
|
||||
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
|
||||
|
||||
# Requests deletion of a Folder. The Folder is moved into the
|
||||
# [DELETE_REQUESTED] state immediately, and is deleted approximately 30 days
|
||||
# later. This method may only be called on an empty Folder in the [ACTIVE]
|
||||
# state, where a Folder is empty if it doesn't contain any Folders or
|
||||
# Projects in the [ACTIVE] state.
|
||||
# The caller must have `resourcemanager.folders.delete` permission on the
|
||||
# identified folder.
|
||||
# @param [String] name
|
||||
# the resource name of the Folder to be deleted.
|
||||
# Must be of the form `folders/`folder_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::CloudresourcemanagerV2beta1::Folder] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::Folder]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_folder(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v2beta1/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::Folder::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::Folder
|
||||
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
|
||||
|
||||
# Retrieves a Folder identified by the supplied resource name.
|
||||
# Valid Folder resource names have the format `folders/`folder_id``
|
||||
# (for example, `folders/1234`).
|
||||
# The caller must have `resourcemanager.folders.get` permission on the
|
||||
# identified folder.
|
||||
# @param [String] name
|
||||
# The resource name of the Folder to retrieve.
|
||||
# Must be of the form `folders/`folder_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::CloudresourcemanagerV2beta1::Folder] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::Folder]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_folder(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v2beta1/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::Folder::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::Folder
|
||||
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 Folder. The returned policy may be
|
||||
# empty if no such policy or resource exists. The `resource` field should
|
||||
# be the Folder's resource name, e.g. "folders/1234".
|
||||
# The caller must have `resourcemanager.folders.getIamPolicy` permission
|
||||
# on the identified folder.
|
||||
# @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::CloudresourcemanagerV2beta1::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::CloudresourcemanagerV2beta1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::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_folder_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/{+resource}:getIamPolicy', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV2beta1::GetIamPolicyRequest::Representation
|
||||
command.request_object = get_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::Policy::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists the Folders that are direct descendants of supplied parent resource.
|
||||
# List provides a strongly consistent view of the Folders underneath
|
||||
# the specified parent resource.
|
||||
# List returns Folders sorted based upon the (ascending) lexical ordering
|
||||
# of their display_name.
|
||||
# The caller must have `resourcemanager.folders.list` permission on the
|
||||
# identified parent.
|
||||
# @param [Fixnum] page_size
|
||||
# The maximum number of Folders to return in the response.
|
||||
# This field is optional.
|
||||
# @param [String] page_token
|
||||
# A pagination token returned from a previous call to `ListFolders`
|
||||
# that indicates where this listing should continue from.
|
||||
# This field is optional.
|
||||
# @param [String] parent
|
||||
# The resource name of the Organization or Folder whose Folders are
|
||||
# being listed.
|
||||
# Must be of the form `folders/`folder_id`` or `organizations/`org_id``.
|
||||
# Access to this method is controlled by checking the
|
||||
# `resourcemanager.folders.list` permission on the `parent`.
|
||||
# @param [Boolean] show_deleted
|
||||
# Controls whether Folders in the [DELETE_REQUESTED` state should
|
||||
# be returned.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudresourcemanagerV2beta1::ListFoldersResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::ListFoldersResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_folders(page_size: nil, page_token: nil, parent: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v2beta1/folders', options)
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::ListFoldersResponse::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::ListFoldersResponse
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['parent'] = parent unless parent.nil?
|
||||
command.query['showDeleted'] = show_deleted unless show_deleted.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Moves a Folder under a new resource parent.
|
||||
# Returns an Operation which can be used to track the progress of the
|
||||
# folder move workflow.
|
||||
# Upon success the Operation.response field will be populated with the
|
||||
# moved Folder.
|
||||
# Upon failure, a FolderOperationError categorizing the failure cause will
|
||||
# be returned - if the failure occurs synchronously then the
|
||||
# FolderOperationError will be returned via the Status.details field
|
||||
# and if it occurs asynchronously then the FolderOperation will be returned
|
||||
# via the the Operation.error field.
|
||||
# In addition, the Operation.metadata field will be populated with a
|
||||
# FolderOperation message as an aid to stateless clients.
|
||||
# Folder moves will be rejected if they violate either the naming, height
|
||||
# or fanout constraints described in the [CreateFolder] documentation.
|
||||
# The caller must have `resourcemanager.folders.move` permission on the
|
||||
# folder's current and proposed new parent.
|
||||
# @param [String] name
|
||||
# The resource name of the Folder to move.
|
||||
# Must be of the form folders/`folder_id`
|
||||
# @param [Google::Apis::CloudresourcemanagerV2beta1::MoveFolderRequest] move_folder_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::CloudresourcemanagerV2beta1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::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 move_folder(name, move_folder_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/{+name}:move', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV2beta1::MoveFolderRequest::Representation
|
||||
command.request_object = move_folder_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::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
|
||||
|
||||
# Updates a Folder, changing its display_name.
|
||||
# Changes to the folder display_name will be rejected if they violate either
|
||||
# the display_name formatting rules or naming constraints described in
|
||||
# the [CreateFolder] documentation.
|
||||
# + The Folder's display name must start and end with a letter or digit,
|
||||
# may contain letters, digits, spaces, hyphens and underscores and can be
|
||||
# no longer than 30 characters. This is captured by the regular expression:
|
||||
# [\p`L`\p`N`](`\p`L`\p`N`_- ]`0,28`[\p`L`\p`N`])?.
|
||||
# The caller must have `resourcemanager.folders.update` permission on the
|
||||
# identified folder.
|
||||
# If the update fails due to the unique name constraint then a
|
||||
# PreconditionFailure explaining this violation will be returned
|
||||
# in the Status.details field.
|
||||
# @param [String] name
|
||||
# Output only. The resource name of the Folder.
|
||||
# Its format is `folders/`folder_id``, for example: "folders/1234".
|
||||
# @param [Google::Apis::CloudresourcemanagerV2beta1::Folder] folder_object
|
||||
# @param [String] update_mask
|
||||
# Fields to be updated.
|
||||
# Only the `display_name` 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::CloudresourcemanagerV2beta1::Folder] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::Folder]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_folder(name, folder_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v2beta1/{+name}', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV2beta1::Folder::Representation
|
||||
command.request_object = folder_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::Folder::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::Folder
|
||||
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
|
||||
|
||||
# Search for folders that match specific filter criteria.
|
||||
# Search provides an eventually consistent view of the folders a user has
|
||||
# access to which meet the specified filter criteria.
|
||||
# This will only return folders on which the caller has the
|
||||
# permission `resourcemanager.folders.get`.
|
||||
# @param [Google::Apis::CloudresourcemanagerV2beta1::SearchFoldersRequest] search_folders_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::CloudresourcemanagerV2beta1::SearchFoldersResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::SearchFoldersResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_folders(search_folders_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/folders:search', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV2beta1::SearchFoldersRequest::Representation
|
||||
command.request_object = search_folders_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::SearchFoldersResponse::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::SearchFoldersResponse
|
||||
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 a Folder, replacing any existing policy.
|
||||
# The `resource` field should be the Folder's resource name, e.g.
|
||||
# "folders/1234".
|
||||
# The caller must have `resourcemanager.folders.setIamPolicy` permission
|
||||
# on the identified folder.
|
||||
# @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::CloudresourcemanagerV2beta1::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::CloudresourcemanagerV2beta1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::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_folder_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV2beta1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::Policy::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::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 Folder.
|
||||
# The `resource` field should be the Folder's resource name,
|
||||
# e.g. "folders/1234".
|
||||
# There are no permissions required for making this API call.
|
||||
# @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::CloudresourcemanagerV2beta1::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::CloudresourcemanagerV2beta1::TestIamPermissionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::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_folder_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/{+resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV2beta1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::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
|
||||
|
||||
# Cancels the deletion request for a Folder. This method may only be
|
||||
# called on a Folder in the [DELETE_REQUESTED] state.
|
||||
# In order to succeed, the Folder's parent must be in the [ACTIVE] state.
|
||||
# In addition, reintroducing the folder into the tree must not violate
|
||||
# folder naming, height and fanout constraints described in the
|
||||
# [CreateFolder] documentation.
|
||||
# The caller must have `resourcemanager.folders.undelete` permission on the
|
||||
# identified folder.
|
||||
# @param [String] name
|
||||
# The resource name of the Folder to undelete.
|
||||
# Must be of the form `folders/`folder_id``.
|
||||
# @param [Google::Apis::CloudresourcemanagerV2beta1::UndeleteFolderRequest] undelete_folder_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::CloudresourcemanagerV2beta1::Folder] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudresourcemanagerV2beta1::Folder]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def undelete_folder(name, undelete_folder_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/{+name}:undelete', options)
|
||||
command.request_representation = Google::Apis::CloudresourcemanagerV2beta1::UndeleteFolderRequest::Representation
|
||||
command.request_object = undelete_folder_request_object
|
||||
command.response_representation = Google::Apis::CloudresourcemanagerV2beta1::Folder::Representation
|
||||
command.response_class = Google::Apis::CloudresourcemanagerV2beta1::Folder
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -28,16 +28,16 @@ module Google
|
|||
# @see https://cloud.google.com/trace
|
||||
module CloudtraceV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20170711'
|
||||
REVISION = '20170815'
|
||||
|
||||
# Read Trace data for a project or application
|
||||
AUTH_TRACE_READONLY = 'https://www.googleapis.com/auth/trace.readonly'
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# Write Trace data for a project or application
|
||||
AUTH_TRACE_APPEND = 'https://www.googleapis.com/auth/trace.append'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
# Read Trace data for a project or application
|
||||
AUTH_TRACE_READONLY = 'https://www.googleapis.com/auth/trace.readonly'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,22 +22,68 @@ module Google
|
|||
module Apis
|
||||
module CloudtraceV1
|
||||
|
||||
# A generic empty message that you can re-use to avoid defining duplicated
|
||||
# empty messages in your APIs. A typical example is to use it as the request
|
||||
# or the response type of an API method. For instance:
|
||||
# service Foo `
|
||||
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
# `
|
||||
# The JSON representation for `Empty` is empty JSON object ````.
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for the `ListTraces` method.
|
||||
class ListTracesResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# If defined, indicates that there are more traces that match the request
|
||||
# and that this value should be passed to the next request to continue
|
||||
# retrieving additional traces.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# List of trace records returned.
|
||||
# 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)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@traces = args[:traces] if args.key?(:traces)
|
||||
end
|
||||
end
|
||||
|
||||
# A trace describes how long it takes for an application to perform an
|
||||
# operation. It consists of a set of spans, each of which represent a single
|
||||
# timed event within the operation.
|
||||
class Trace
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Collection of spans in the trace.
|
||||
# Corresponds to the JSON property `spans`
|
||||
# @return [Array<Google::Apis::CloudtraceV1::TraceSpan>]
|
||||
attr_accessor :spans
|
||||
|
||||
# Project ID of the Cloud project where the trace data is stored.
|
||||
# Corresponds to the JSON property `projectId`
|
||||
# @return [String]
|
||||
attr_accessor :project_id
|
||||
|
||||
# Collection of spans in the trace.
|
||||
# Corresponds to the JSON property `spans`
|
||||
# @return [Array<Google::Apis::CloudtraceV1::TraceSpan>]
|
||||
attr_accessor :spans
|
||||
|
||||
# Globally unique identifier for the trace. This identifier is a 128-bit
|
||||
# numeric value formatted as a 32-byte hex string.
|
||||
# Corresponds to the JSON property `traceId`
|
||||
|
@ -50,31 +96,12 @@ module Google
|
|||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@spans = args[:spans] if args.key?(:spans)
|
||||
@project_id = args[:project_id] if args.key?(:project_id)
|
||||
@spans = args[:spans] if args.key?(:spans)
|
||||
@trace_id = args[:trace_id] if args.key?(:trace_id)
|
||||
end
|
||||
end
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
@ -83,21 +110,11 @@ module Google
|
|||
class TraceSpan
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# ID of the parent span, if any. Optional.
|
||||
# Corresponds to the JSON property `parentSpanId`
|
||||
# @return [Fixnum]
|
||||
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.
|
||||
|
@ -149,59 +166,43 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# ID of the parent span, if any. Optional.
|
||||
# Corresponds to the JSON property `parentSpanId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :parent_span_id
|
||||
|
||||
# Identifier for the span. Must be a 64-bit integer other than 0 and
|
||||
# unique within a trace.
|
||||
# Corresponds to the JSON property `spanId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :span_id
|
||||
|
||||
# Start time of the span in nanoseconds from the UNIX epoch.
|
||||
# Corresponds to the JSON property `startTime`
|
||||
# @return [String]
|
||||
attr_accessor :start_time
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@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)
|
||||
@labels = args[:labels] if args.key?(:labels)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id)
|
||||
@span_id = args[:span_id] if args.key?(:span_id)
|
||||
@start_time = args[:start_time] if args.key?(:start_time)
|
||||
end
|
||||
end
|
||||
|
||||
# A generic empty message that you can re-use to avoid defining duplicated
|
||||
# empty messages in your APIs. A typical example is to use it as the request
|
||||
# or the response type of an API method. For instance:
|
||||
# service Foo `
|
||||
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
# `
|
||||
# The JSON representation for `Empty` is empty JSON object ````.
|
||||
class Empty
|
||||
# List of new or updated traces.
|
||||
class Traces
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for the `ListTraces` method.
|
||||
class ListTracesResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# If defined, indicates that there are more traces that match the request
|
||||
# and that this value should be passed to the next request to continue
|
||||
# retrieving additional traces.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# List of trace records returned.
|
||||
# List of traces.
|
||||
# Corresponds to the JSON property `traces`
|
||||
# @return [Array<Google::Apis::CloudtraceV1::Trace>]
|
||||
attr_accessor :traces
|
||||
|
@ -212,7 +213,6 @@ module Google
|
|||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@traces = args[:traces] if args.key?(:traces)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,24 +22,6 @@ module Google
|
|||
module Apis
|
||||
module CloudtraceV1
|
||||
|
||||
class Trace
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Traces
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TraceSpan
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Empty
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -53,34 +35,21 @@ module Google
|
|||
end
|
||||
|
||||
class Trace
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :spans, as: 'spans', class: Google::Apis::CloudtraceV1::TraceSpan, decorator: Google::Apis::CloudtraceV1::TraceSpan::Representation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
property :project_id, as: 'projectId'
|
||||
property :trace_id, as: 'traceId'
|
||||
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
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TraceSpan
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :parent_span_id, :numeric_string => true, as: 'parentSpanId'
|
||||
property :end_time, as: 'endTime'
|
||||
property :start_time, as: 'startTime'
|
||||
property :kind, as: 'kind'
|
||||
hash :labels, as: 'labels'
|
||||
property :name, as: 'name'
|
||||
property :span_id, :numeric_string => true, as: 'spanId'
|
||||
end
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Traces
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Empty
|
||||
|
@ -97,6 +66,37 @@ module Google
|
|||
|
||||
end
|
||||
end
|
||||
|
||||
class Trace
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :project_id, as: 'projectId'
|
||||
collection :spans, as: 'spans', class: Google::Apis::CloudtraceV1::TraceSpan, decorator: Google::Apis::CloudtraceV1::TraceSpan::Representation
|
||||
|
||||
property :trace_id, as: 'traceId'
|
||||
end
|
||||
end
|
||||
|
||||
class TraceSpan
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
property :kind, as: 'kind'
|
||||
hash :labels, as: 'labels'
|
||||
property :name, as: 'name'
|
||||
property :parent_span_id, :numeric_string => true, as: 'parentSpanId'
|
||||
property :span_id, :numeric_string => true, as: 'spanId'
|
||||
property :start_time, as: 'startTime'
|
||||
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
|
||||
|
|
|
@ -58,11 +58,11 @@ module Google
|
|||
# @param [String] project_id
|
||||
# ID of the Cloud project where the trace data is stored.
|
||||
# @param [Google::Apis::CloudtraceV1::Traces] traces_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
|
@ -75,15 +75,15 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def patch_project_traces(project_id, traces_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
def patch_project_traces(project_id, traces_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1/projects/{projectId}/traces', options)
|
||||
command.request_representation = Google::Apis::CloudtraceV1::Traces::Representation
|
||||
command.request_object = traces_object
|
||||
command.response_representation = Google::Apis::CloudtraceV1::Empty::Representation
|
||||
command.response_class = Google::Apis::CloudtraceV1::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?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
|
@ -92,11 +92,11 @@ module Google
|
|||
# ID of the Cloud project where the trace data is stored.
|
||||
# @param [String] trace_id
|
||||
# ID of the trace to return.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
|
@ -109,31 +109,23 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_trace(project_id, trace_id, quota_user: nil, fields: nil, options: nil, &block)
|
||||
def get_project_trace(project_id, trace_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/projects/{projectId}/traces/{traceId}', options)
|
||||
command.response_representation = Google::Apis::CloudtraceV1::Trace::Representation
|
||||
command.response_class = Google::Apis::CloudtraceV1::Trace
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['traceId'] = trace_id unless trace_id.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns of a list of traces that match the specified filter conditions.
|
||||
# @param [String] project_id
|
||||
# ID of the Cloud project where the trace data is stored.
|
||||
# @param [String] order_by
|
||||
# Field used to sort the returned traces. Optional.
|
||||
# Can be one of the following:
|
||||
# * `trace_id`
|
||||
# * `name` (`name` field of root span in the trace)
|
||||
# * `duration` (difference between `end_time` and `start_time` fields of
|
||||
# the root span)
|
||||
# * `start` (`start_time` field of the root span)
|
||||
# Descending order can be specified by appending `desc` to the sort field
|
||||
# (for example, `name desc`).
|
||||
# Only one sort field is permitted.
|
||||
# @param [String] end_time
|
||||
# End of the time interval (inclusive) during which the trace data was
|
||||
# collected from the application.
|
||||
# @param [String] filter
|
||||
# An optional filter against labels for the request.
|
||||
# By default, searches use prefix matching. To specify exact match, prepend
|
||||
|
@ -163,27 +155,35 @@ module Google
|
|||
# specified.
|
||||
# * `method:VALUE`: Equivalent to `/http/method:VALUE`.
|
||||
# * `url:VALUE`: Equivalent to `/http/url:VALUE`.
|
||||
# @param [String] end_time
|
||||
# End of the time interval (inclusive) during which the trace data was
|
||||
# collected from the application.
|
||||
# @param [String] start_time
|
||||
# Start of the time interval (inclusive) during which the trace data was
|
||||
# collected from the application.
|
||||
# @param [String] page_token
|
||||
# Token identifying the page of results to return. If provided, use the
|
||||
# value of the `next_page_token` field from a previous request. Optional.
|
||||
# @param [String] order_by
|
||||
# Field used to sort the returned traces. Optional.
|
||||
# Can be one of the following:
|
||||
# * `trace_id`
|
||||
# * `name` (`name` field of root span in the trace)
|
||||
# * `duration` (difference between `end_time` and `start_time` fields of
|
||||
# the root span)
|
||||
# * `start` (`start_time` field of the root span)
|
||||
# Descending order can be specified by appending `desc` to the sort field
|
||||
# (for example, `name desc`).
|
||||
# Only one sort field is permitted.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of traces to return. If not specified or <= 0, the
|
||||
# implementation selects a reasonable value. The implementation may
|
||||
# return fewer traces than the requested page size. Optional.
|
||||
# @param [String] page_token
|
||||
# Token identifying the page of results to return. If provided, use the
|
||||
# value of the `next_page_token` field from a previous request. Optional.
|
||||
# @param [String] start_time
|
||||
# Start of the time interval (inclusive) during which the trace data was
|
||||
# collected from the application.
|
||||
# @param [String] view
|
||||
# Type of data returned for traces in the list. Optional. Default is
|
||||
# `MINIMAL`.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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
|
||||
#
|
||||
|
@ -196,20 +196,20 @@ module Google
|
|||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_project_traces(project_id, order_by: nil, filter: nil, end_time: nil, start_time: nil, page_token: nil, page_size: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block)
|
||||
def list_project_traces(project_id, end_time: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, start_time: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/projects/{projectId}/traces', options)
|
||||
command.response_representation = Google::Apis::CloudtraceV1::ListTracesResponse::Representation
|
||||
command.response_class = Google::Apis::CloudtraceV1::ListTracesResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['orderBy'] = order_by unless order_by.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['endTime'] = end_time unless end_time.nil?
|
||||
command.query['startTime'] = start_time unless start_time.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['orderBy'] = order_by unless order_by.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['startTime'] = start_time unless start_time.nil?
|
||||
command.query['view'] = view unless view.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
# 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/clouduseraccounts_alpha/service.rb'
|
||||
require 'google/apis/clouduseraccounts_alpha/classes.rb'
|
||||
require 'google/apis/clouduseraccounts_alpha/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Cloud User Accounts API
|
||||
#
|
||||
# Creates and manages users and groups for accessing Google Compute Engine
|
||||
# virtual machines.
|
||||
#
|
||||
# @see https://cloud.google.com/compute/docs/access/user-accounts/api/latest/
|
||||
module ClouduseraccountsAlpha
|
||||
VERSION = 'Alpha'
|
||||
REVISION = '20160316'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
||||
|
||||
# Manage your Google Cloud User Accounts
|
||||
AUTH_CLOUD_USERACCOUNTS = 'https://www.googleapis.com/auth/cloud.useraccounts'
|
||||
|
||||
# View your Google Cloud User Accounts
|
||||
AUTH_CLOUD_USERACCOUNTS_READONLY = 'https://www.googleapis.com/auth/cloud.useraccounts.readonly'
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,494 @@
|
|||
# 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 ClouduseraccountsAlpha
|
||||
|
||||
class AuditConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuthorizedKeysView
|
||||
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 Condition
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Group
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GroupList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GroupsAddMemberRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GroupsRemoveMemberRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxAccountViews
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxGetAuthorizedKeysViewResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxGetLinuxAccountViewsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxGroupView
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxUserView
|
||||
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 LogConfigCounterOptions
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Error
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Error
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
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 OperationList
|
||||
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 PublicKey
|
||||
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 TestPermissionsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestPermissionsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class User
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UserList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuditConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :exempted_members, as: 'exemptedMembers'
|
||||
property :service, as: 'service'
|
||||
end
|
||||
end
|
||||
|
||||
class AuthorizedKeysView
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :keys, as: 'keys'
|
||||
property :sudoer, as: 'sudoer'
|
||||
end
|
||||
end
|
||||
|
||||
class Binding
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :members, as: 'members'
|
||||
property :role, as: 'role'
|
||||
end
|
||||
end
|
||||
|
||||
class Condition
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :iam, as: 'iam'
|
||||
property :op, as: 'op'
|
||||
property :svc, as: 'svc'
|
||||
property :sys, as: 'sys'
|
||||
property :value, as: 'value'
|
||||
collection :values, as: 'values'
|
||||
end
|
||||
end
|
||||
|
||||
class Group
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
collection :members, as: 'members'
|
||||
property :name, as: 'name'
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class GroupList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
collection :items, as: 'items', class: Google::Apis::ClouduseraccountsAlpha::Group, decorator: Google::Apis::ClouduseraccountsAlpha::Group::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class GroupsAddMemberRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :users, as: 'users'
|
||||
end
|
||||
end
|
||||
|
||||
class GroupsRemoveMemberRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :users, as: 'users'
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxAccountViews
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :group_views, as: 'groupViews', class: Google::Apis::ClouduseraccountsAlpha::LinuxGroupView, decorator: Google::Apis::ClouduseraccountsAlpha::LinuxGroupView::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
collection :user_views, as: 'userViews', class: Google::Apis::ClouduseraccountsAlpha::LinuxUserView, decorator: Google::Apis::ClouduseraccountsAlpha::LinuxUserView::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxGetAuthorizedKeysViewResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :resource, as: 'resource', class: Google::Apis::ClouduseraccountsAlpha::AuthorizedKeysView, decorator: Google::Apis::ClouduseraccountsAlpha::AuthorizedKeysView::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxGetLinuxAccountViewsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :resource, as: 'resource', class: Google::Apis::ClouduseraccountsAlpha::LinuxAccountViews, decorator: Google::Apis::ClouduseraccountsAlpha::LinuxAccountViews::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxGroupView
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :gid, as: 'gid'
|
||||
property :group_name, as: 'groupName'
|
||||
collection :members, as: 'members'
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxUserView
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :gecos, as: 'gecos'
|
||||
property :gid, as: 'gid'
|
||||
property :home_directory, as: 'homeDirectory'
|
||||
property :shell, as: 'shell'
|
||||
property :uid, as: 'uid'
|
||||
property :username, as: 'username'
|
||||
end
|
||||
end
|
||||
|
||||
class LogConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :counter, as: 'counter', class: Google::Apis::ClouduseraccountsAlpha::LogConfigCounterOptions, decorator: Google::Apis::ClouduseraccountsAlpha::LogConfigCounterOptions::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LogConfigCounterOptions
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :field, as: 'field'
|
||||
property :metric, as: 'metric'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :client_operation_id, as: 'clientOperationId'
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
property :end_time, as: 'endTime'
|
||||
property :error, as: 'error', class: Google::Apis::ClouduseraccountsAlpha::Operation::Error, decorator: Google::Apis::ClouduseraccountsAlpha::Operation::Error::Representation
|
||||
|
||||
property :http_error_message, as: 'httpErrorMessage'
|
||||
property :http_error_status_code, as: 'httpErrorStatusCode'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :progress, as: 'progress'
|
||||
property :region, as: 'region'
|
||||
property :self_link, as: 'selfLink'
|
||||
property :start_time, as: 'startTime'
|
||||
property :status, as: 'status'
|
||||
property :status_message, as: 'statusMessage'
|
||||
property :target_id, :numeric_string => true, as: 'targetId'
|
||||
property :target_link, as: 'targetLink'
|
||||
property :user, as: 'user'
|
||||
collection :warnings, as: 'warnings', class: Google::Apis::ClouduseraccountsAlpha::Operation::Warning, decorator: Google::Apis::ClouduseraccountsAlpha::Operation::Warning::Representation
|
||||
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
|
||||
class Error
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :errors, as: 'errors', class: Google::Apis::ClouduseraccountsAlpha::Operation::Error::Error, decorator: Google::Apis::ClouduseraccountsAlpha::Operation::Error::Error::Representation
|
||||
|
||||
end
|
||||
|
||||
class Error
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
property :location, as: 'location'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Warning
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :data, as: 'data', class: Google::Apis::ClouduseraccountsAlpha::Operation::Warning::Datum, decorator: Google::Apis::ClouduseraccountsAlpha::Operation::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 OperationList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
collection :items, as: 'items', class: Google::Apis::ClouduseraccountsAlpha::Operation, decorator: Google::Apis::ClouduseraccountsAlpha::Operation::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class Policy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::ClouduseraccountsAlpha::AuditConfig, decorator: Google::Apis::ClouduseraccountsAlpha::AuditConfig::Representation
|
||||
|
||||
collection :bindings, as: 'bindings', class: Google::Apis::ClouduseraccountsAlpha::Binding, decorator: Google::Apis::ClouduseraccountsAlpha::Binding::Representation
|
||||
|
||||
property :etag, :base64 => true, as: 'etag'
|
||||
property :iam_owned, as: 'iamOwned'
|
||||
collection :rules, as: 'rules', class: Google::Apis::ClouduseraccountsAlpha::Rule, decorator: Google::Apis::ClouduseraccountsAlpha::Rule::Representation
|
||||
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class PublicKey
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
property :expiration_timestamp, as: 'expirationTimestamp'
|
||||
property :fingerprint, as: 'fingerprint'
|
||||
property :key, as: 'key'
|
||||
end
|
||||
end
|
||||
|
||||
class Rule
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :action, as: 'action'
|
||||
collection :conditions, as: 'conditions', class: Google::Apis::ClouduseraccountsAlpha::Condition, decorator: Google::Apis::ClouduseraccountsAlpha::Condition::Representation
|
||||
|
||||
property :description, as: 'description'
|
||||
collection :ins, as: 'ins'
|
||||
collection :log_configs, as: 'logConfigs', class: Google::Apis::ClouduseraccountsAlpha::LogConfig, decorator: Google::Apis::ClouduseraccountsAlpha::LogConfig::Representation
|
||||
|
||||
collection :not_ins, as: 'notIns'
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class TestPermissionsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class TestPermissionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class User
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
collection :groups, as: 'groups'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :owner, as: 'owner'
|
||||
collection :public_keys, as: 'publicKeys', class: Google::Apis::ClouduseraccountsAlpha::PublicKey, decorator: Google::Apis::ClouduseraccountsAlpha::PublicKey::Representation
|
||||
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class UserList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
collection :items, as: 'items', class: Google::Apis::ClouduseraccountsAlpha::User, decorator: Google::Apis::ClouduseraccountsAlpha::User::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,44 @@
|
|||
# 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/clouduseraccounts_vm_beta/service.rb'
|
||||
require 'google/apis/clouduseraccounts_vm_beta/classes.rb'
|
||||
require 'google/apis/clouduseraccounts_vm_beta/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Cloud User Accounts API
|
||||
#
|
||||
# Creates and manages users and groups for accessing Google Compute Engine
|
||||
# virtual machines.
|
||||
#
|
||||
# @see https://cloud.google.com/compute/docs/access/user-accounts/api/latest/
|
||||
module ClouduseraccountsVmBeta
|
||||
VERSION = 'VmBeta'
|
||||
REVISION = '20160316'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
||||
|
||||
# Manage your Google Cloud User Accounts
|
||||
AUTH_CLOUD_USERACCOUNTS = 'https://www.googleapis.com/auth/cloud.useraccounts'
|
||||
|
||||
# View your Google Cloud User Accounts
|
||||
AUTH_CLOUD_USERACCOUNTS_READONLY = 'https://www.googleapis.com/auth/cloud.useraccounts.readonly'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,845 @@
|
|||
# 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 ClouduseraccountsVmBeta
|
||||
|
||||
# A list of authorized public keys for a user account.
|
||||
class AuthorizedKeysView
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] The list of authorized public keys in SSH format.
|
||||
# Corresponds to the JSON property `keys`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :keys
|
||||
|
||||
# [Output Only] Whether the user has the ability to elevate on the instance that
|
||||
# requested the authorized keys.
|
||||
# Corresponds to the JSON property `sudoer`
|
||||
# @return [Boolean]
|
||||
attr_accessor :sudoer
|
||||
alias_method :sudoer?, :sudoer
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@keys = args[:keys] if args.key?(:keys)
|
||||
@sudoer = args[:sudoer] if args.key?(:sudoer)
|
||||
end
|
||||
end
|
||||
|
||||
# A Group resource.
|
||||
class Group
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] Creation timestamp in RFC3339 text format.
|
||||
# Corresponds to the JSON property `creationTimestamp`
|
||||
# @return [String]
|
||||
attr_accessor :creation_timestamp
|
||||
|
||||
# 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
|
||||
|
||||
# [Output Only] Unique identifier for the resource; defined by the server.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# [Output Only] Type of the resource. Always clouduseraccounts#group for groups.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# [Output Only] A list of URLs to User resources who belong to the group. Users
|
||||
# may only be members of groups in the same project.
|
||||
# Corresponds to the JSON property `members`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :members
|
||||
|
||||
# Name of the resource; provided by the client when the resource is created.
|
||||
# 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)
|
||||
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class GroupList
|
||||
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
|
||||
|
||||
# [Output Only] A list of Group resources.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::Group>]
|
||||
attr_accessor :items
|
||||
|
||||
# [Output Only] Type of resource. Always clouduseraccounts#groupList for lists
|
||||
# of groups.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# [Output Only] A token used to continue a truncated list request.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# [Output Only] Server defined URL for this resource.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@items = args[:items] if args.key?(:items)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class GroupsAddMemberRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Fully-qualified URLs of the User resources to add.
|
||||
# Corresponds to the JSON property `users`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :users
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@users = args[:users] if args.key?(:users)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class GroupsRemoveMemberRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Fully-qualified URLs of the User resources to remove.
|
||||
# Corresponds to the JSON property `users`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :users
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@users = args[:users] if args.key?(:users)
|
||||
end
|
||||
end
|
||||
|
||||
# A list of all Linux accounts for this project. This API is only used by
|
||||
# Compute Engine virtual machines to get information about user accounts for a
|
||||
# project or instance. Linux resources are read-only views into users and groups
|
||||
# managed by the Compute Engine Accounts API.
|
||||
class LinuxAccountViews
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] A list of all groups within a project.
|
||||
# Corresponds to the JSON property `groupViews`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::LinuxGroupView>]
|
||||
attr_accessor :group_views
|
||||
|
||||
# [Output Only] Type of the resource. Always clouduseraccounts#linuxAccountViews
|
||||
# for Linux resources.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# [Output Only] A list of all users within a project.
|
||||
# Corresponds to the JSON property `userViews`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::LinuxUserView>]
|
||||
attr_accessor :user_views
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@group_views = args[:group_views] if args.key?(:group_views)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@user_views = args[:user_views] if args.key?(:user_views)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class LinuxGetAuthorizedKeysViewResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of authorized public keys for a user account.
|
||||
# Corresponds to the JSON property `resource`
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::AuthorizedKeysView]
|
||||
attr_accessor :resource
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@resource = args[:resource] if args.key?(:resource)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class LinuxGetLinuxAccountViewsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of all Linux accounts for this project. This API is only used by
|
||||
# Compute Engine virtual machines to get information about user accounts for a
|
||||
# project or instance. Linux resources are read-only views into users and groups
|
||||
# managed by the Compute Engine Accounts API.
|
||||
# Corresponds to the JSON property `resource`
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::LinuxAccountViews]
|
||||
attr_accessor :resource
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@resource = args[:resource] if args.key?(:resource)
|
||||
end
|
||||
end
|
||||
|
||||
# A detailed view of a Linux group.
|
||||
class LinuxGroupView
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] The Group ID.
|
||||
# Corresponds to the JSON property `gid`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :gid
|
||||
|
||||
# [Output Only] Group name.
|
||||
# Corresponds to the JSON property `groupName`
|
||||
# @return [String]
|
||||
attr_accessor :group_name
|
||||
|
||||
# [Output Only] List of user accounts that belong to the group.
|
||||
# Corresponds to the JSON property `members`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :members
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@gid = args[:gid] if args.key?(:gid)
|
||||
@group_name = args[:group_name] if args.key?(:group_name)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
end
|
||||
end
|
||||
|
||||
# A detailed view of a Linux user account.
|
||||
class LinuxUserView
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] The GECOS (user information) entry for this account.
|
||||
# Corresponds to the JSON property `gecos`
|
||||
# @return [String]
|
||||
attr_accessor :gecos
|
||||
|
||||
# [Output Only] User's default group ID.
|
||||
# Corresponds to the JSON property `gid`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :gid
|
||||
|
||||
# [Output Only] The path to the home directory for this account.
|
||||
# Corresponds to the JSON property `homeDirectory`
|
||||
# @return [String]
|
||||
attr_accessor :home_directory
|
||||
|
||||
# [Output Only] The path to the login shell for this account.
|
||||
# Corresponds to the JSON property `shell`
|
||||
# @return [String]
|
||||
attr_accessor :shell
|
||||
|
||||
# [Output Only] User ID.
|
||||
# Corresponds to the JSON property `uid`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :uid
|
||||
|
||||
# [Output Only] The username of the account.
|
||||
# Corresponds to the JSON property `username`
|
||||
# @return [String]
|
||||
attr_accessor :username
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@gecos = args[:gecos] if args.key?(:gecos)
|
||||
@gid = args[:gid] if args.key?(:gid)
|
||||
@home_directory = args[:home_directory] if args.key?(:home_directory)
|
||||
@shell = args[:shell] if args.key?(:shell)
|
||||
@uid = args[:uid] if args.key?(:uid)
|
||||
@username = args[:username] if args.key?(:username)
|
||||
end
|
||||
end
|
||||
|
||||
# An Operation resource, used to manage asynchronous API requests.
|
||||
class Operation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] Reserved for future use.
|
||||
# Corresponds to the JSON property `clientOperationId`
|
||||
# @return [String]
|
||||
attr_accessor :client_operation_id
|
||||
|
||||
# [Output Only] Creation timestamp in RFC3339 text format.
|
||||
# Corresponds to the JSON property `creationTimestamp`
|
||||
# @return [String]
|
||||
attr_accessor :creation_timestamp
|
||||
|
||||
# [Output Only] A textual description of the operation, which is set when the
|
||||
# operation is created.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# [Output Only] The time that this operation was completed. This value is in
|
||||
# RFC3339 text format.
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [String]
|
||||
attr_accessor :end_time
|
||||
|
||||
# [Output Only] If errors are generated during processing of the operation, this
|
||||
# field will be populated.
|
||||
# Corresponds to the JSON property `error`
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::Operation::Error]
|
||||
attr_accessor :error
|
||||
|
||||
# [Output Only] If the operation fails, this field contains the HTTP error
|
||||
# message that was returned, such as NOT FOUND.
|
||||
# Corresponds to the JSON property `httpErrorMessage`
|
||||
# @return [String]
|
||||
attr_accessor :http_error_message
|
||||
|
||||
# [Output Only] If the operation fails, this field contains the HTTP error
|
||||
# status code that was returned. For example, a 404 means the resource was not
|
||||
# found.
|
||||
# Corresponds to the JSON property `httpErrorStatusCode`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :http_error_status_code
|
||||
|
||||
# [Output Only] The unique identifier for the resource. This identifier is
|
||||
# defined by the server.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# [Output Only] The time that this operation was requested. This value is in
|
||||
# RFC3339 text format.
|
||||
# Corresponds to the JSON property `insertTime`
|
||||
# @return [String]
|
||||
attr_accessor :insert_time
|
||||
|
||||
# [Output Only] Type of the resource. Always compute#operation for Operation
|
||||
# resources.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# [Output Only] Name of the resource.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# [Output Only] The type of operation, such as insert, update, or delete, and so
|
||||
# on.
|
||||
# Corresponds to the JSON property `operationType`
|
||||
# @return [String]
|
||||
attr_accessor :operation_type
|
||||
|
||||
# [Output Only] An optional progress indicator that ranges from 0 to 100. There
|
||||
# is no requirement that this be linear or support any granularity of operations.
|
||||
# This should not be used to guess when the operation will be complete. This
|
||||
# number should monotonically increase as the operation progresses.
|
||||
# Corresponds to the JSON property `progress`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :progress
|
||||
|
||||
# [Output Only] The URL of the region where the operation resides. Only
|
||||
# available when performing regional operations.
|
||||
# Corresponds to the JSON property `region`
|
||||
# @return [String]
|
||||
attr_accessor :region
|
||||
|
||||
# [Output Only] Server-defined URL for the resource.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# [Output Only] The time that this operation was started by the server. This
|
||||
# value is in RFC3339 text format.
|
||||
# Corresponds to the JSON property `startTime`
|
||||
# @return [String]
|
||||
attr_accessor :start_time
|
||||
|
||||
# [Output Only] The status of the operation, which can be one of the following:
|
||||
# PENDING, RUNNING, or DONE.
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
# [Output Only] An optional textual description of the current status of the
|
||||
# operation.
|
||||
# Corresponds to the JSON property `statusMessage`
|
||||
# @return [String]
|
||||
attr_accessor :status_message
|
||||
|
||||
# [Output Only] The unique target ID, which identifies a specific incarnation of
|
||||
# the target resource.
|
||||
# Corresponds to the JSON property `targetId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :target_id
|
||||
|
||||
# [Output Only] The URL of the resource that the operation modifies.
|
||||
# Corresponds to the JSON property `targetLink`
|
||||
# @return [String]
|
||||
attr_accessor :target_link
|
||||
|
||||
# [Output Only] User who requested the operation, for example: user@example.com.
|
||||
# Corresponds to the JSON property `user`
|
||||
# @return [String]
|
||||
attr_accessor :user
|
||||
|
||||
# [Output Only] If warning messages are generated during processing of the
|
||||
# operation, this field will be populated.
|
||||
# Corresponds to the JSON property `warnings`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::Operation::Warning>]
|
||||
attr_accessor :warnings
|
||||
|
||||
# [Output Only] The URL of the zone where the operation resides. Only available
|
||||
# when performing per-zone operations.
|
||||
# Corresponds to the JSON property `zone`
|
||||
# @return [String]
|
||||
attr_accessor :zone
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@client_operation_id = args[:client_operation_id] if args.key?(:client_operation_id)
|
||||
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@error = args[:error] if args.key?(:error)
|
||||
@http_error_message = args[:http_error_message] if args.key?(:http_error_message)
|
||||
@http_error_status_code = args[:http_error_status_code] if args.key?(:http_error_status_code)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@insert_time = args[:insert_time] if args.key?(:insert_time)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@operation_type = args[:operation_type] if args.key?(:operation_type)
|
||||
@progress = args[:progress] if args.key?(:progress)
|
||||
@region = args[:region] if args.key?(:region)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
@start_time = args[:start_time] if args.key?(:start_time)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
@status_message = args[:status_message] if args.key?(:status_message)
|
||||
@target_id = args[:target_id] if args.key?(:target_id)
|
||||
@target_link = args[:target_link] if args.key?(:target_link)
|
||||
@user = args[:user] if args.key?(:user)
|
||||
@warnings = args[:warnings] if args.key?(:warnings)
|
||||
@zone = args[:zone] if args.key?(:zone)
|
||||
end
|
||||
|
||||
# [Output Only] If errors are generated during processing of the operation, this
|
||||
# field will be populated.
|
||||
class Error
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] The array of errors encountered while processing this operation.
|
||||
# Corresponds to the JSON property `errors`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::Operation::Error::Error>]
|
||||
attr_accessor :errors
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@errors = args[:errors] if args.key?(:errors)
|
||||
end
|
||||
|
||||
#
|
||||
class Error
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] The error type identifier for this error.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [String]
|
||||
attr_accessor :code
|
||||
|
||||
# [Output Only] Indicates the field in the request that caused the error. This
|
||||
# property is optional.
|
||||
# Corresponds to the JSON property `location`
|
||||
# @return [String]
|
||||
attr_accessor :location
|
||||
|
||||
# [Output Only] An optional, human-readable error message.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@location = args[:location] if args.key?(:location)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class Warning
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] A warning code, if applicable. For example, Compute Engine
|
||||
# returns NO_RESULTS_ON_PAGE if there are no results in the response.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [String]
|
||||
attr_accessor :code
|
||||
|
||||
# [Output Only] Metadata about this warning in key: value format. For example:
|
||||
# "data": [ ` "key": "scope", "value": "zones/us-east1-d" `
|
||||
# Corresponds to the JSON property `data`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::Operation::Warning::Datum>]
|
||||
attr_accessor :data
|
||||
|
||||
# [Output Only] A human-readable description of the warning code.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@data = args[:data] if args.key?(:data)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
end
|
||||
|
||||
#
|
||||
class Datum
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] A key that provides more detail on the warning being returned.
|
||||
# For example, for warnings where there are no results in a list request for a
|
||||
# particular zone, this key might be scope and the key value might be the zone
|
||||
# name. Other examples might be a key indicating a deprecated resource and a
|
||||
# suggested replacement, or a warning about invalid network settings (for
|
||||
# example, if an instance attempts to perform IP forwarding but is not enabled
|
||||
# for IP forwarding).
|
||||
# Corresponds to the JSON property `key`
|
||||
# @return [String]
|
||||
attr_accessor :key
|
||||
|
||||
# [Output Only] A warning data value corresponding to the key.
|
||||
# Corresponds to the JSON property `value`
|
||||
# @return [String]
|
||||
attr_accessor :value
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@key = args[:key] if args.key?(:key)
|
||||
@value = args[:value] if args.key?(:value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Contains a list of Operation resources.
|
||||
class OperationList
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] The unique identifier for the resource. This identifier is
|
||||
# defined by the server.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# [Output Only] A list of Operation resources.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::Operation>]
|
||||
attr_accessor :items
|
||||
|
||||
# [Output Only] Type of resource. Always compute#operations for Operations
|
||||
# resource.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# [Output Only] This token allows you to get the next page of results for list
|
||||
# requests. If the number of results is larger than maxResults, use the
|
||||
# nextPageToken as a value for the query parameter pageToken in the next list
|
||||
# request. Subsequent list requests will have their own nextPageToken to
|
||||
# continue paging through the results.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# [Output Only] Server-defined URL for this resource.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@items = args[:items] if args.key?(:items)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
end
|
||||
end
|
||||
|
||||
# A public key for authenticating to guests.
|
||||
class PublicKey
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] Creation timestamp in RFC3339 text format.
|
||||
# Corresponds to the JSON property `creationTimestamp`
|
||||
# @return [String]
|
||||
attr_accessor :creation_timestamp
|
||||
|
||||
# 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
|
||||
|
||||
# Optional expiration timestamp. If provided, the timestamp must be in RFC3339
|
||||
# text format. If not provided, the public key never expires.
|
||||
# Corresponds to the JSON property `expirationTimestamp`
|
||||
# @return [String]
|
||||
attr_accessor :expiration_timestamp
|
||||
|
||||
# [Output Only] The fingerprint of the key is defined by RFC4716 to be the MD5
|
||||
# digest of the public key.
|
||||
# Corresponds to the JSON property `fingerprint`
|
||||
# @return [String]
|
||||
attr_accessor :fingerprint
|
||||
|
||||
# Public key text in SSH format, defined by RFC4253 section 6.6.
|
||||
# Corresponds to the JSON property `key`
|
||||
# @return [String]
|
||||
attr_accessor :key
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@expiration_timestamp = args[:expiration_timestamp] if args.key?(:expiration_timestamp)
|
||||
@fingerprint = args[:fingerprint] if args.key?(:fingerprint)
|
||||
@key = args[:key] if args.key?(:key)
|
||||
end
|
||||
end
|
||||
|
||||
# A User resource.
|
||||
class User
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output Only] Creation timestamp in RFC3339 text format.
|
||||
# Corresponds to the JSON property `creationTimestamp`
|
||||
# @return [String]
|
||||
attr_accessor :creation_timestamp
|
||||
|
||||
# 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
|
||||
|
||||
# [Output Only] A list of URLs to Group resources who contain the user. Users
|
||||
# are only members of groups in the same project.
|
||||
# Corresponds to the JSON property `groups`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :groups
|
||||
|
||||
# [Output Only] Unique identifier for the resource; defined by the server.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :id
|
||||
|
||||
# [Output Only] Type of the resource. Always clouduseraccounts#user for users.
|
||||
# Corresponds to the JSON property `kind`
|
||||
# @return [String]
|
||||
attr_accessor :kind
|
||||
|
||||
# Name of the resource; provided by the client when the resource is created.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# Email address of account's owner. This account will be validated to make sure
|
||||
# it exists. The email can belong to any domain, but it must be tied to a Google
|
||||
# account.
|
||||
# Corresponds to the JSON property `owner`
|
||||
# @return [String]
|
||||
attr_accessor :owner
|
||||
|
||||
# [Output Only] Public keys that this user may use to login.
|
||||
# Corresponds to the JSON property `publicKeys`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::PublicKey>]
|
||||
attr_accessor :public_keys
|
||||
|
||||
# [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)
|
||||
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@groups = args[:groups] if args.key?(:groups)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@kind = args[:kind] if args.key?(:kind)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@owner = args[:owner] if args.key?(:owner)
|
||||
@public_keys = args[:public_keys] if args.key?(:public_keys)
|
||||
@self_link = args[:self_link] if args.key?(:self_link)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class UserList
|
||||
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
|
||||
|
||||
# [Output Only] A list of User resources.
|
||||
# Corresponds to the JSON property `items`
|
||||
# @return [Array<Google::Apis::ClouduseraccountsVmBeta::User>]
|
||||
attr_accessor :items
|
||||
|
||||
# [Output Only] Type of resource. Always clouduseraccounts#userList for lists of
|
||||
# users.
|
||||
# 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
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,352 @@
|
|||
# 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 ClouduseraccountsVmBeta
|
||||
|
||||
class AuthorizedKeysView
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Group
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GroupList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GroupsAddMemberRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GroupsRemoveMemberRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxAccountViews
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxGetAuthorizedKeysViewResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxGetLinuxAccountViewsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxGroupView
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LinuxUserView
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Error
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
class Error
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
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 OperationList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PublicKey
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class User
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UserList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuthorizedKeysView
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :keys, as: 'keys'
|
||||
property :sudoer, as: 'sudoer'
|
||||
end
|
||||
end
|
||||
|
||||
class Group
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
collection :members, as: 'members'
|
||||
property :name, as: 'name'
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class GroupList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
collection :items, as: 'items', class: Google::Apis::ClouduseraccountsVmBeta::Group, decorator: Google::Apis::ClouduseraccountsVmBeta::Group::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class GroupsAddMemberRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :users, as: 'users'
|
||||
end
|
||||
end
|
||||
|
||||
class GroupsRemoveMemberRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :users, as: 'users'
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxAccountViews
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :group_views, as: 'groupViews', class: Google::Apis::ClouduseraccountsVmBeta::LinuxGroupView, decorator: Google::Apis::ClouduseraccountsVmBeta::LinuxGroupView::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
collection :user_views, as: 'userViews', class: Google::Apis::ClouduseraccountsVmBeta::LinuxUserView, decorator: Google::Apis::ClouduseraccountsVmBeta::LinuxUserView::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxGetAuthorizedKeysViewResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :resource, as: 'resource', class: Google::Apis::ClouduseraccountsVmBeta::AuthorizedKeysView, decorator: Google::Apis::ClouduseraccountsVmBeta::AuthorizedKeysView::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxGetLinuxAccountViewsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :resource, as: 'resource', class: Google::Apis::ClouduseraccountsVmBeta::LinuxAccountViews, decorator: Google::Apis::ClouduseraccountsVmBeta::LinuxAccountViews::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxGroupView
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :gid, as: 'gid'
|
||||
property :group_name, as: 'groupName'
|
||||
collection :members, as: 'members'
|
||||
end
|
||||
end
|
||||
|
||||
class LinuxUserView
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :gecos, as: 'gecos'
|
||||
property :gid, as: 'gid'
|
||||
property :home_directory, as: 'homeDirectory'
|
||||
property :shell, as: 'shell'
|
||||
property :uid, as: 'uid'
|
||||
property :username, as: 'username'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :client_operation_id, as: 'clientOperationId'
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
property :end_time, as: 'endTime'
|
||||
property :error, as: 'error', class: Google::Apis::ClouduseraccountsVmBeta::Operation::Error, decorator: Google::Apis::ClouduseraccountsVmBeta::Operation::Error::Representation
|
||||
|
||||
property :http_error_message, as: 'httpErrorMessage'
|
||||
property :http_error_status_code, as: 'httpErrorStatusCode'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :insert_time, as: 'insertTime'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :progress, as: 'progress'
|
||||
property :region, as: 'region'
|
||||
property :self_link, as: 'selfLink'
|
||||
property :start_time, as: 'startTime'
|
||||
property :status, as: 'status'
|
||||
property :status_message, as: 'statusMessage'
|
||||
property :target_id, :numeric_string => true, as: 'targetId'
|
||||
property :target_link, as: 'targetLink'
|
||||
property :user, as: 'user'
|
||||
collection :warnings, as: 'warnings', class: Google::Apis::ClouduseraccountsVmBeta::Operation::Warning, decorator: Google::Apis::ClouduseraccountsVmBeta::Operation::Warning::Representation
|
||||
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
|
||||
class Error
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :errors, as: 'errors', class: Google::Apis::ClouduseraccountsVmBeta::Operation::Error::Error, decorator: Google::Apis::ClouduseraccountsVmBeta::Operation::Error::Error::Representation
|
||||
|
||||
end
|
||||
|
||||
class Error
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
property :location, as: 'location'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Warning
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :data, as: 'data', class: Google::Apis::ClouduseraccountsVmBeta::Operation::Warning::Datum, decorator: Google::Apis::ClouduseraccountsVmBeta::Operation::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 OperationList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
collection :items, as: 'items', class: Google::Apis::ClouduseraccountsVmBeta::Operation, decorator: Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class PublicKey
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
property :expiration_timestamp, as: 'expirationTimestamp'
|
||||
property :fingerprint, as: 'fingerprint'
|
||||
property :key, as: 'key'
|
||||
end
|
||||
end
|
||||
|
||||
class User
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
collection :groups, as: 'groups'
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
property :owner, as: 'owner'
|
||||
collection :public_keys, as: 'publicKeys', class: Google::Apis::ClouduseraccountsVmBeta::PublicKey, decorator: Google::Apis::ClouduseraccountsVmBeta::PublicKey::Representation
|
||||
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
|
||||
class UserList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
collection :items, as: 'items', class: Google::Apis::ClouduseraccountsVmBeta::User, decorator: Google::Apis::ClouduseraccountsVmBeta::User::Representation
|
||||
|
||||
property :kind, as: 'kind'
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :self_link, as: 'selfLink'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,908 @@
|
|||
# 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 ClouduseraccountsVmBeta
|
||||
# Cloud User Accounts API
|
||||
#
|
||||
# Creates and manages users and groups for accessing Google Compute Engine
|
||||
# virtual machines.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/clouduseraccounts_vm_beta'
|
||||
#
|
||||
# Clouduseraccounts = Google::Apis::ClouduseraccountsVmBeta # Alias the module
|
||||
# service = Clouduseraccounts::CloudUserAccountsService.new
|
||||
#
|
||||
# @see https://cloud.google.com/compute/docs/access/user-accounts/api/latest/
|
||||
class CloudUserAccountsService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'clouduseraccounts/vm_beta/projects/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Deletes the specified operation resource.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] operation
|
||||
# Name of the Operations 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 [NilClass] No result returned for this method
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_global_accounts_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, '{project}/global/operations/{operation}', options)
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['operation'] = operation unless operation.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 specified operation resource.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] operation
|
||||
# Name of the Operations 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::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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_global_accounts_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{project}/global/operations/{operation}', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::Operation
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['operation'] = operation unless operation.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 operation resources contained within 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.
|
||||
# Compute Engine Beta API Only: If you use filtering in the Beta API, you can
|
||||
# also filter on nested fields. For example, you could filter on instances that
|
||||
# have set the scheduling.automaticRestart field to true. In particular, use
|
||||
# filtering on nested fields to take advantage of instance labels to organize
|
||||
# and filter results based on label values.
|
||||
# The Beta API also supports filtering on multiple expressions by providing each
|
||||
# separate expression within parentheses. For example, (scheduling.
|
||||
# automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are
|
||||
# treated as AND expressions, meaning that resources must match all expressions
|
||||
# to pass the filters.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of results per page that should be returned. If the number
|
||||
# of available results is larger than maxResults, Compute Engine returns a
|
||||
# nextPageToken that can be used to get the next page of results in subsequent
|
||||
# list requests.
|
||||
# @param [String] order_by
|
||||
# Sorts list results by a certain order. By default, results are returned in
|
||||
# alphanumerical order based on the resource name.
|
||||
# You can also sort results in descending order based on the creation timestamp
|
||||
# using orderBy="creationTimestamp desc". This sorts results based on the
|
||||
# creationTimestamp field in reverse chronological order (newest result first).
|
||||
# Use this to sort resources like operations so that the newest operation is
|
||||
# returned first.
|
||||
# Currently, only sorting by name or creationTimestamp desc is supported.
|
||||
# @param [String] page_token
|
||||
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
||||
# a previous list request to get the next page of results.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ClouduseraccountsVmBeta::OperationList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::OperationList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_global_accounts_operations(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/operations', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::OperationList::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::OperationList
|
||||
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
|
||||
|
||||
# Adds users to the specified group.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] group_name
|
||||
# Name of the group for this request.
|
||||
# @param [Google::Apis::ClouduseraccountsVmBeta::GroupsAddMemberRequest] groups_add_member_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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 add_group_member(project, group_name, groups_add_member_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{project}/global/groups/{groupName}/addMember', options)
|
||||
command.request_representation = Google::Apis::ClouduseraccountsVmBeta::GroupsAddMemberRequest::Representation
|
||||
command.request_object = groups_add_member_request_object
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::Operation
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['groupName'] = group_name unless group_name.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
|
||||
|
||||
# Deletes the specified Group resource.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] group_name
|
||||
# Name of the Group 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::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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_group(project, group_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, '{project}/global/groups/{groupName}', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::Operation
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['groupName'] = group_name unless group_name.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 Group resource.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] group_name
|
||||
# Name of the Group 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::ClouduseraccountsVmBeta::Group] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::Group]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group(project, group_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{project}/global/groups/{groupName}', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Group::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::Group
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['groupName'] = group_name unless group_name.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 Group resource in the specified project using the data included in
|
||||
# the request.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [Google::Apis::ClouduseraccountsVmBeta::Group] group_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::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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_group(project, group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{project}/global/groups', options)
|
||||
command.request_representation = Google::Apis::ClouduseraccountsVmBeta::Group::Representation
|
||||
command.request_object = group_object
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::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 groups contained within 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.
|
||||
# Compute Engine Beta API Only: If you use filtering in the Beta API, you can
|
||||
# also filter on nested fields. For example, you could filter on instances that
|
||||
# have set the scheduling.automaticRestart field to true. In particular, use
|
||||
# filtering on nested fields to take advantage of instance labels to organize
|
||||
# and filter results based on label values.
|
||||
# The Beta API also supports filtering on multiple expressions by providing each
|
||||
# separate expression within parentheses. For example, (scheduling.
|
||||
# automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are
|
||||
# treated as AND expressions, meaning that resources must match all expressions
|
||||
# to pass the filters.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of results per page that should be returned. If the number
|
||||
# of available results is larger than maxResults, Compute Engine returns a
|
||||
# nextPageToken that can be used to get the next page of results in subsequent
|
||||
# list requests.
|
||||
# @param [String] order_by
|
||||
# Sorts list results by a certain order. By default, results are returned in
|
||||
# alphanumerical order based on the resource name.
|
||||
# You can also sort results in descending order based on the creation timestamp
|
||||
# using orderBy="creationTimestamp desc". This sorts results based on the
|
||||
# creationTimestamp field in reverse chronological order (newest result first).
|
||||
# Use this to sort resources like operations so that the newest operation is
|
||||
# returned first.
|
||||
# Currently, only sorting by name or creationTimestamp desc is supported.
|
||||
# @param [String] page_token
|
||||
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
||||
# a previous list request to get the next page of results.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ClouduseraccountsVmBeta::GroupList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::GroupList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_groups(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/groups', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::GroupList::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::GroupList
|
||||
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
|
||||
|
||||
# Removes users from the specified group.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] group_name
|
||||
# Name of the group for this request.
|
||||
# @param [Google::Apis::ClouduseraccountsVmBeta::GroupsRemoveMemberRequest] groups_remove_member_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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 remove_group_member(project, group_name, groups_remove_member_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{project}/global/groups/{groupName}/removeMember', options)
|
||||
command.request_representation = Google::Apis::ClouduseraccountsVmBeta::GroupsRemoveMemberRequest::Representation
|
||||
command.request_object = groups_remove_member_request_object
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::Operation
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['groupName'] = group_name unless group_name.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 a list of authorized public keys for a specific user account.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] zone
|
||||
# Name of the zone for this request.
|
||||
# @param [String] user
|
||||
# The user account for which you want to get a list of authorized public keys.
|
||||
# @param [String] instance
|
||||
# The fully-qualified URL of the virtual machine requesting the view.
|
||||
# @param [Boolean] login
|
||||
# Whether the view was requested as part of a user-initiated login.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::ClouduseraccountsVmBeta::LinuxGetAuthorizedKeysViewResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::LinuxGetAuthorizedKeysViewResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_linux_authorized_keys_view(project, zone, user, instance, login: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{project}/zones/{zone}/authorizedKeysView/{user}', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::LinuxGetAuthorizedKeysViewResponse::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::LinuxGetAuthorizedKeysViewResponse
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['zone'] = zone unless zone.nil?
|
||||
command.params['user'] = user unless user.nil?
|
||||
command.query['instance'] = instance unless instance.nil?
|
||||
command.query['login'] = login unless login.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves a list of user accounts for an instance within a specific project.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] zone
|
||||
# Name of the zone for this request.
|
||||
# @param [String] instance
|
||||
# The fully-qualified URL of the virtual machine requesting the views.
|
||||
# @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.
|
||||
# Compute Engine Beta API Only: If you use filtering in the Beta API, you can
|
||||
# also filter on nested fields. For example, you could filter on instances that
|
||||
# have set the scheduling.automaticRestart field to true. In particular, use
|
||||
# filtering on nested fields to take advantage of instance labels to organize
|
||||
# and filter results based on label values.
|
||||
# The Beta API also supports filtering on multiple expressions by providing each
|
||||
# separate expression within parentheses. For example, (scheduling.
|
||||
# automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are
|
||||
# treated as AND expressions, meaning that resources must match all expressions
|
||||
# to pass the filters.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of results per page that should be returned. If the number
|
||||
# of available results is larger than maxResults, Compute Engine returns a
|
||||
# nextPageToken that can be used to get the next page of results in subsequent
|
||||
# list requests.
|
||||
# @param [String] order_by
|
||||
# Sorts list results by a certain order. By default, results are returned in
|
||||
# alphanumerical order based on the resource name.
|
||||
# You can also sort results in descending order based on the creation timestamp
|
||||
# using orderBy="creationTimestamp desc". This sorts results based on the
|
||||
# creationTimestamp field in reverse chronological order (newest result first).
|
||||
# Use this to sort resources like operations so that the newest operation is
|
||||
# returned first.
|
||||
# Currently, only sorting by name or creationTimestamp desc is supported.
|
||||
# @param [String] page_token
|
||||
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
||||
# a previous list request to get the next page of results.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ClouduseraccountsVmBeta::LinuxGetLinuxAccountViewsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::LinuxGetLinuxAccountViewsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_linux_linux_account_views(project, zone, instance, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{project}/zones/{zone}/linuxAccountViews', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::LinuxGetLinuxAccountViewsResponse::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::LinuxGetLinuxAccountViewsResponse
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['zone'] = zone unless zone.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['instance'] = instance unless instance.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
|
||||
|
||||
# Adds a public key to the specified User resource with the data included in the
|
||||
# request.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] user
|
||||
# Name of the user for this request.
|
||||
# @param [Google::Apis::ClouduseraccountsVmBeta::PublicKey] public_key_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::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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 add_user_public_key(project, user, public_key_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{project}/global/users/{user}/addPublicKey', options)
|
||||
command.request_representation = Google::Apis::ClouduseraccountsVmBeta::PublicKey::Representation
|
||||
command.request_object = public_key_object
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::Operation
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['user'] = user unless user.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
|
||||
|
||||
# Deletes the specified User resource.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] user
|
||||
# Name of the user 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::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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_user(project, user, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, '{project}/global/users/{user}', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::Operation
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['user'] = user unless user.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 User resource.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] user
|
||||
# Name of the user 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::ClouduseraccountsVmBeta::User] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::User]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user(project, user, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{project}/global/users/{user}', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::User::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::User
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['user'] = user unless user.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 User resource in the specified project using the data included in
|
||||
# the request.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [Google::Apis::ClouduseraccountsVmBeta::User] user_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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_user(project, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{project}/global/users', options)
|
||||
command.request_representation = Google::Apis::ClouduseraccountsVmBeta::User::Representation
|
||||
command.request_object = user_object
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::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 a list of users contained within 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.
|
||||
# Compute Engine Beta API Only: If you use filtering in the Beta API, you can
|
||||
# also filter on nested fields. For example, you could filter on instances that
|
||||
# have set the scheduling.automaticRestart field to true. In particular, use
|
||||
# filtering on nested fields to take advantage of instance labels to organize
|
||||
# and filter results based on label values.
|
||||
# The Beta API also supports filtering on multiple expressions by providing each
|
||||
# separate expression within parentheses. For example, (scheduling.
|
||||
# automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are
|
||||
# treated as AND expressions, meaning that resources must match all expressions
|
||||
# to pass the filters.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of results per page that should be returned. If the number
|
||||
# of available results is larger than maxResults, Compute Engine returns a
|
||||
# nextPageToken that can be used to get the next page of results in subsequent
|
||||
# list requests.
|
||||
# @param [String] order_by
|
||||
# Sorts list results by a certain order. By default, results are returned in
|
||||
# alphanumerical order based on the resource name.
|
||||
# You can also sort results in descending order based on the creation timestamp
|
||||
# using orderBy="creationTimestamp desc". This sorts results based on the
|
||||
# creationTimestamp field in reverse chronological order (newest result first).
|
||||
# Use this to sort resources like operations so that the newest operation is
|
||||
# returned first.
|
||||
# Currently, only sorting by name or creationTimestamp desc is supported.
|
||||
# @param [String] page_token
|
||||
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
|
||||
# a previous list request to get the next page of results.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ClouduseraccountsVmBeta::UserList] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::UserList]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_users(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/users', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::UserList::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::UserList
|
||||
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
|
||||
|
||||
# Removes the specified public key from the user.
|
||||
# @param [String] project
|
||||
# Project ID for this request.
|
||||
# @param [String] user
|
||||
# Name of the user for this request.
|
||||
# @param [String] fingerprint
|
||||
# The fingerprint of the public key to delete. Public keys are identified by
|
||||
# their fingerprint, which is defined by RFC4716 to be the MD5 digest of the
|
||||
# public key.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::ClouduseraccountsVmBeta::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ClouduseraccountsVmBeta::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 remove_user_public_key(project, user, fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{project}/global/users/{user}/removePublicKey', options)
|
||||
command.response_representation = Google::Apis::ClouduseraccountsVmBeta::Operation::Representation
|
||||
command.response_class = Google::Apis::ClouduseraccountsVmBeta::Operation
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.params['user'] = user unless user.nil?
|
||||
command.query['fingerprint'] = fingerprint unless fingerprint.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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,49 @@
|
|||
# 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/compute_alpha/service.rb'
|
||||
require 'google/apis/compute_alpha/classes.rb'
|
||||
require 'google/apis/compute_alpha/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Compute Engine API
|
||||
#
|
||||
# Creates and runs virtual machines on Google Cloud Platform.
|
||||
#
|
||||
# @see https://developers.google.com/compute/docs/reference/latest/
|
||||
module ComputeAlpha
|
||||
VERSION = 'Alpha'
|
||||
REVISION = '20170816'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View and manage your Google Compute Engine resources
|
||||
AUTH_COMPUTE = 'https://www.googleapis.com/auth/compute'
|
||||
|
||||
# View your Google Compute Engine resources
|
||||
AUTH_COMPUTE_READONLY = 'https://www.googleapis.com/auth/compute.readonly'
|
||||
|
||||
# Manage your data and permissions in Google Cloud Storage
|
||||
AUTH_DEVSTORAGE_FULL_CONTROL = 'https://www.googleapis.com/auth/devstorage.full_control'
|
||||
|
||||
# View your data in Google Cloud Storage
|
||||
AUTH_DEVSTORAGE_READ_ONLY = 'https://www.googleapis.com/auth/devstorage.read_only'
|
||||
|
||||
# Manage your data in Google Cloud Storage
|
||||
AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write'
|
||||
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
|
@ -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/container_v1beta1/service.rb'
|
||||
require 'google/apis/container_v1beta1/classes.rb'
|
||||
require 'google/apis/container_v1beta1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Container Engine API
|
||||
#
|
||||
# The Google Container Engine API is used for building and managing container
|
||||
# based applications, powered by the open source Kubernetes technology.
|
||||
#
|
||||
# @see https://cloud.google.com/container-engine/
|
||||
module ContainerV1beta1
|
||||
VERSION = 'V1beta1'
|
||||
REVISION = '20170814'
|
||||
|
||||
# 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
|
@ -0,0 +1,662 @@
|
|||
# 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 ContainerV1beta1
|
||||
|
||||
class AcceleratorConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AddonsConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AutoUpgradeOptions
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CancelOperationRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CidrBlock
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ClientCertificateConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Cluster
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ClusterUpdate
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CompleteIpRotationRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CreateClusterRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CreateNodePoolRequest
|
||||
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 HorizontalPodAutoscaling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class HttpLoadBalancing
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class IpAllocationPolicy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class KubernetesDashboard
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListClustersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListNodePoolsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MasterAuth
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MasterAuthorizedNetworksConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NetworkPolicy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NodeConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NodeManagement
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NodePool
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NodePoolAutoscaling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class RollbackNodePoolUpgradeRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ServerConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetLabelsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetLegacyAbacRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetMasterAuthRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetNetworkPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetNodePoolManagementRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class StartIpRotationRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UpdateClusterRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AcceleratorConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :accelerator_count, :numeric_string => true, as: 'acceleratorCount'
|
||||
property :accelerator_type, as: 'acceleratorType'
|
||||
end
|
||||
end
|
||||
|
||||
class AddonsConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :horizontal_pod_autoscaling, as: 'horizontalPodAutoscaling', class: Google::Apis::ContainerV1beta1::HorizontalPodAutoscaling, decorator: Google::Apis::ContainerV1beta1::HorizontalPodAutoscaling::Representation
|
||||
|
||||
property :http_load_balancing, as: 'httpLoadBalancing', class: Google::Apis::ContainerV1beta1::HttpLoadBalancing, decorator: Google::Apis::ContainerV1beta1::HttpLoadBalancing::Representation
|
||||
|
||||
property :kubernetes_dashboard, as: 'kubernetesDashboard', class: Google::Apis::ContainerV1beta1::KubernetesDashboard, decorator: Google::Apis::ContainerV1beta1::KubernetesDashboard::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class AutoUpgradeOptions
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auto_upgrade_start_time, as: 'autoUpgradeStartTime'
|
||||
property :description, as: 'description'
|
||||
end
|
||||
end
|
||||
|
||||
class CancelOperationRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :operation_id, as: 'operationId'
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class CidrBlock
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cidr_block, as: 'cidrBlock'
|
||||
property :display_name, as: 'displayName'
|
||||
end
|
||||
end
|
||||
|
||||
class ClientCertificateConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :issue_client_certificate, as: 'issueClientCertificate'
|
||||
end
|
||||
end
|
||||
|
||||
class Cluster
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :addons_config, as: 'addonsConfig', class: Google::Apis::ContainerV1beta1::AddonsConfig, decorator: Google::Apis::ContainerV1beta1::AddonsConfig::Representation
|
||||
|
||||
property :cluster_ipv4_cidr, as: 'clusterIpv4Cidr'
|
||||
property :create_time, as: 'createTime'
|
||||
property :current_master_version, as: 'currentMasterVersion'
|
||||
property :current_node_count, as: 'currentNodeCount'
|
||||
property :current_node_version, as: 'currentNodeVersion'
|
||||
property :description, as: 'description'
|
||||
property :enable_kubernetes_alpha, as: 'enableKubernetesAlpha'
|
||||
property :endpoint, as: 'endpoint'
|
||||
property :expire_time, as: 'expireTime'
|
||||
property :initial_cluster_version, as: 'initialClusterVersion'
|
||||
property :initial_node_count, as: 'initialNodeCount'
|
||||
collection :instance_group_urls, as: 'instanceGroupUrls'
|
||||
property :ip_allocation_policy, as: 'ipAllocationPolicy', class: Google::Apis::ContainerV1beta1::IpAllocationPolicy, decorator: Google::Apis::ContainerV1beta1::IpAllocationPolicy::Representation
|
||||
|
||||
property :location, as: 'location'
|
||||
collection :locations, as: 'locations'
|
||||
property :logging_service, as: 'loggingService'
|
||||
property :master_auth, as: 'masterAuth', class: Google::Apis::ContainerV1beta1::MasterAuth, decorator: Google::Apis::ContainerV1beta1::MasterAuth::Representation
|
||||
|
||||
property :master_authorized_networks_config, as: 'masterAuthorizedNetworksConfig', class: Google::Apis::ContainerV1beta1::MasterAuthorizedNetworksConfig, decorator: Google::Apis::ContainerV1beta1::MasterAuthorizedNetworksConfig::Representation
|
||||
|
||||
property :monitoring_service, as: 'monitoringService'
|
||||
property :name, as: 'name'
|
||||
property :network, as: 'network'
|
||||
property :network_policy, as: 'networkPolicy', class: Google::Apis::ContainerV1beta1::NetworkPolicy, decorator: Google::Apis::ContainerV1beta1::NetworkPolicy::Representation
|
||||
|
||||
property :node_config, as: 'nodeConfig', class: Google::Apis::ContainerV1beta1::NodeConfig, decorator: Google::Apis::ContainerV1beta1::NodeConfig::Representation
|
||||
|
||||
property :node_ipv4_cidr_size, as: 'nodeIpv4CidrSize'
|
||||
collection :node_pools, as: 'nodePools', class: Google::Apis::ContainerV1beta1::NodePool, decorator: Google::Apis::ContainerV1beta1::NodePool::Representation
|
||||
|
||||
property :self_link, as: 'selfLink'
|
||||
property :services_ipv4_cidr, as: 'servicesIpv4Cidr'
|
||||
property :status, as: 'status'
|
||||
property :status_message, as: 'statusMessage'
|
||||
property :subnetwork, as: 'subnetwork'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class ClusterUpdate
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :desired_addons_config, as: 'desiredAddonsConfig', class: Google::Apis::ContainerV1beta1::AddonsConfig, decorator: Google::Apis::ContainerV1beta1::AddonsConfig::Representation
|
||||
|
||||
property :desired_image_type, as: 'desiredImageType'
|
||||
collection :desired_locations, as: 'desiredLocations'
|
||||
property :desired_master_authorized_networks_config, as: 'desiredMasterAuthorizedNetworksConfig', class: Google::Apis::ContainerV1beta1::MasterAuthorizedNetworksConfig, decorator: Google::Apis::ContainerV1beta1::MasterAuthorizedNetworksConfig::Representation
|
||||
|
||||
property :desired_master_version, as: 'desiredMasterVersion'
|
||||
property :desired_monitoring_service, as: 'desiredMonitoringService'
|
||||
property :desired_node_pool_autoscaling, as: 'desiredNodePoolAutoscaling', class: Google::Apis::ContainerV1beta1::NodePoolAutoscaling, decorator: Google::Apis::ContainerV1beta1::NodePoolAutoscaling::Representation
|
||||
|
||||
property :desired_node_pool_id, as: 'desiredNodePoolId'
|
||||
property :desired_node_version, as: 'desiredNodeVersion'
|
||||
end
|
||||
end
|
||||
|
||||
class CompleteIpRotationRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :name, as: 'name'
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class CreateClusterRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster, as: 'cluster', class: Google::Apis::ContainerV1beta1::Cluster, decorator: Google::Apis::ContainerV1beta1::Cluster::Representation
|
||||
|
||||
property :parent, as: 'parent'
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class CreateNodePoolRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :node_pool, as: 'nodePool', class: Google::Apis::ContainerV1beta1::NodePool, decorator: Google::Apis::ContainerV1beta1::NodePool::Representation
|
||||
|
||||
property :parent, as: 'parent'
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class Empty
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class HorizontalPodAutoscaling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :disabled, as: 'disabled'
|
||||
end
|
||||
end
|
||||
|
||||
class HttpLoadBalancing
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :disabled, as: 'disabled'
|
||||
end
|
||||
end
|
||||
|
||||
class IpAllocationPolicy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_ipv4_cidr, as: 'clusterIpv4Cidr'
|
||||
property :create_subnetwork, as: 'createSubnetwork'
|
||||
property :node_ipv4_cidr, as: 'nodeIpv4Cidr'
|
||||
property :services_ipv4_cidr, as: 'servicesIpv4Cidr'
|
||||
property :subnetwork_name, as: 'subnetworkName'
|
||||
property :use_ip_aliases, as: 'useIpAliases'
|
||||
end
|
||||
end
|
||||
|
||||
class KubernetesDashboard
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :disabled, as: 'disabled'
|
||||
end
|
||||
end
|
||||
|
||||
class ListClustersResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :clusters, as: 'clusters', class: Google::Apis::ContainerV1beta1::Cluster, decorator: Google::Apis::ContainerV1beta1::Cluster::Representation
|
||||
|
||||
collection :missing_zones, as: 'missingZones'
|
||||
end
|
||||
end
|
||||
|
||||
class ListNodePoolsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :node_pools, as: 'nodePools', class: Google::Apis::ContainerV1beta1::NodePool, decorator: Google::Apis::ContainerV1beta1::NodePool::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :missing_zones, as: 'missingZones'
|
||||
collection :operations, as: 'operations', class: Google::Apis::ContainerV1beta1::Operation, decorator: Google::Apis::ContainerV1beta1::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class MasterAuth
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :client_certificate, as: 'clientCertificate'
|
||||
property :client_certificate_config, as: 'clientCertificateConfig', class: Google::Apis::ContainerV1beta1::ClientCertificateConfig, decorator: Google::Apis::ContainerV1beta1::ClientCertificateConfig::Representation
|
||||
|
||||
property :client_key, as: 'clientKey'
|
||||
property :cluster_ca_certificate, as: 'clusterCaCertificate'
|
||||
property :password, as: 'password'
|
||||
property :username, as: 'username'
|
||||
end
|
||||
end
|
||||
|
||||
class MasterAuthorizedNetworksConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :cidr_blocks, as: 'cidrBlocks', class: Google::Apis::ContainerV1beta1::CidrBlock, decorator: Google::Apis::ContainerV1beta1::CidrBlock::Representation
|
||||
|
||||
property :enabled, as: 'enabled'
|
||||
end
|
||||
end
|
||||
|
||||
class NetworkPolicy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :enabled, as: 'enabled'
|
||||
property :provider, as: 'provider'
|
||||
end
|
||||
end
|
||||
|
||||
class NodeConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :accelerators, as: 'accelerators', class: Google::Apis::ContainerV1beta1::AcceleratorConfig, decorator: Google::Apis::ContainerV1beta1::AcceleratorConfig::Representation
|
||||
|
||||
property :disk_size_gb, as: 'diskSizeGb'
|
||||
property :image_type, as: 'imageType'
|
||||
hash :labels, as: 'labels'
|
||||
property :local_ssd_count, as: 'localSsdCount'
|
||||
property :machine_type, as: 'machineType'
|
||||
hash :metadata, as: 'metadata'
|
||||
collection :oauth_scopes, as: 'oauthScopes'
|
||||
property :preemptible, as: 'preemptible'
|
||||
property :service_account, as: 'serviceAccount'
|
||||
collection :tags, as: 'tags'
|
||||
end
|
||||
end
|
||||
|
||||
class NodeManagement
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auto_repair, as: 'autoRepair'
|
||||
property :auto_upgrade, as: 'autoUpgrade'
|
||||
property :upgrade_options, as: 'upgradeOptions', class: Google::Apis::ContainerV1beta1::AutoUpgradeOptions, decorator: Google::Apis::ContainerV1beta1::AutoUpgradeOptions::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class NodePool
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :autoscaling, as: 'autoscaling', class: Google::Apis::ContainerV1beta1::NodePoolAutoscaling, decorator: Google::Apis::ContainerV1beta1::NodePoolAutoscaling::Representation
|
||||
|
||||
property :config, as: 'config', class: Google::Apis::ContainerV1beta1::NodeConfig, decorator: Google::Apis::ContainerV1beta1::NodeConfig::Representation
|
||||
|
||||
property :initial_node_count, as: 'initialNodeCount'
|
||||
collection :instance_group_urls, as: 'instanceGroupUrls'
|
||||
property :management, as: 'management', class: Google::Apis::ContainerV1beta1::NodeManagement, decorator: Google::Apis::ContainerV1beta1::NodeManagement::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
property :self_link, as: 'selfLink'
|
||||
property :status, as: 'status'
|
||||
property :status_message, as: 'statusMessage'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class NodePoolAutoscaling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :enabled, as: 'enabled'
|
||||
property :max_node_count, as: 'maxNodeCount'
|
||||
property :min_node_count, as: 'minNodeCount'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :detail, as: 'detail'
|
||||
property :location, as: 'location'
|
||||
property :name, as: 'name'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :self_link, as: 'selfLink'
|
||||
property :status, as: 'status'
|
||||
property :status_message, as: 'statusMessage'
|
||||
property :target_link, as: 'targetLink'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class RollbackNodePoolUpgradeRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :name, as: 'name'
|
||||
property :node_pool_id, as: 'nodePoolId'
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class ServerConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :default_cluster_version, as: 'defaultClusterVersion'
|
||||
property :default_image_type, as: 'defaultImageType'
|
||||
collection :valid_image_types, as: 'validImageTypes'
|
||||
collection :valid_master_versions, as: 'validMasterVersions'
|
||||
collection :valid_node_versions, as: 'validNodeVersions'
|
||||
end
|
||||
end
|
||||
|
||||
class SetLabelsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :label_fingerprint, as: 'labelFingerprint'
|
||||
property :name, as: 'name'
|
||||
property :project_id, as: 'projectId'
|
||||
hash :resource_labels, as: 'resourceLabels'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class SetLegacyAbacRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :enabled, as: 'enabled'
|
||||
property :name, as: 'name'
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class SetMasterAuthRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :action, as: 'action'
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :name, as: 'name'
|
||||
property :project_id, as: 'projectId'
|
||||
property :update, as: 'update', class: Google::Apis::ContainerV1beta1::MasterAuth, decorator: Google::Apis::ContainerV1beta1::MasterAuth::Representation
|
||||
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class SetNetworkPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :name, as: 'name'
|
||||
property :network_policy, as: 'networkPolicy', class: Google::Apis::ContainerV1beta1::NetworkPolicy, decorator: Google::Apis::ContainerV1beta1::NetworkPolicy::Representation
|
||||
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class SetNodePoolManagementRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :management, as: 'management', class: Google::Apis::ContainerV1beta1::NodeManagement, decorator: Google::Apis::ContainerV1beta1::NodeManagement::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
property :node_pool_id, as: 'nodePoolId'
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class StartIpRotationRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :name, as: 'name'
|
||||
property :project_id, as: 'projectId'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateClusterRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_id, as: 'clusterId'
|
||||
property :name, as: 'name'
|
||||
property :project_id, as: 'projectId'
|
||||
property :update, as: 'update', class: Google::Apis::ContainerV1beta1::ClusterUpdate, decorator: Google::Apis::ContainerV1beta1::ClusterUpdate::Representation
|
||||
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
|
@ -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/content_v2sandbox/service.rb'
|
||||
require 'google/apis/content_v2sandbox/classes.rb'
|
||||
require 'google/apis/content_v2sandbox/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Content API for Shopping
|
||||
#
|
||||
# Manages product items, inventory, and Merchant Center accounts for Google
|
||||
# Shopping.
|
||||
#
|
||||
# @see https://developers.google.com/shopping-content
|
||||
module ContentV2sandbox
|
||||
VERSION = 'V2sandbox'
|
||||
REVISION = '20170725'
|
||||
|
||||
# Manage your product listings and accounts for Google Shopping
|
||||
AUTH_CONTENT = 'https://www.googleapis.com/auth/content'
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,709 @@
|
|||
# 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 ContentV2sandbox
|
||||
# Content API for Shopping
|
||||
#
|
||||
# Manages product items, inventory, and Merchant Center accounts for Google
|
||||
# Shopping.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/content_v2sandbox'
|
||||
#
|
||||
# Content = Google::Apis::ContentV2sandbox # Alias the module
|
||||
# service = Content::ShoppingContentService.new
|
||||
#
|
||||
# @see https://developers.google.com/shopping-content
|
||||
class ShoppingContentService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'content/v2sandbox/')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Marks an order as acknowledged. This method can only be called for non-multi-
|
||||
# client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersAcknowledgeRequest] orders_acknowledge_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContentV2sandbox::OrdersAcknowledgeResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersAcknowledgeResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def acknowledge_order(merchant_id, order_id, orders_acknowledge_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/orders/{orderId}/acknowledge', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersAcknowledgeRequest::Representation
|
||||
command.request_object = orders_acknowledge_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersAcknowledgeResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersAcknowledgeResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Sandbox only. Moves a test order from state "inProgress" to state "
|
||||
# pendingShipment". This method can only be called for non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the test order to modify.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::ContentV2sandbox::OrdersAdvanceTestOrderResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersAdvanceTestOrderResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def advancetestorder_order(merchant_id, order_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/testorders/{orderId}/advance', options)
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersAdvanceTestOrderResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersAdvanceTestOrderResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Cancels all line items in an order, making a full refund. This method can only
|
||||
# be called for non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order to cancel.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersCancelRequest] orders_cancel_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContentV2sandbox::OrdersCancelResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersCancelResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_order(merchant_id, order_id, orders_cancel_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/orders/{orderId}/cancel', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersCancelRequest::Representation
|
||||
command.request_object = orders_cancel_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersCancelResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersCancelResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Cancels a line item, making a full refund. This method can only be called for
|
||||
# non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersCancelLineItemRequest] orders_cancel_line_item_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::ContentV2sandbox::OrdersCancelLineItemResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersCancelLineItemResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def cancellineitem_order(merchant_id, order_id, orders_cancel_line_item_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/orders/{orderId}/cancelLineItem', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersCancelLineItemRequest::Representation
|
||||
command.request_object = orders_cancel_line_item_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersCancelLineItemResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersCancelLineItemResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Sandbox only. Creates a test order. This method can only be called for non-
|
||||
# multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersCreateTestOrderRequest] orders_create_test_order_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContentV2sandbox::OrdersCreateTestOrderResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersCreateTestOrderResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def createtestorder_order(merchant_id, orders_create_test_order_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/testorders', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersCreateTestOrderRequest::Representation
|
||||
command.request_object = orders_create_test_order_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersCreateTestOrderResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersCreateTestOrderResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves or modifies multiple orders in a single request. This method can
|
||||
# only be called for non-multi-client accounts.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersCustomBatchRequest] orders_custom_batch_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContentV2sandbox::OrdersCustomBatchResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersCustomBatchResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def custombatch_order(orders_custom_batch_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'orders/batch', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersCustomBatchRequest::Representation
|
||||
command.request_object = orders_custom_batch_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersCustomBatchResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersCustomBatchResponse
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves an order from your Merchant Center account. This method can only be
|
||||
# called for non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::ContentV2sandbox::Order] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::Order]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_order(merchant_id, order_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{merchantId}/orders/{orderId}', options)
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::Order::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::Order
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves an order using merchant order id. This method can only be called for
|
||||
# non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] merchant_order_id
|
||||
# The merchant order id to be looked for.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available 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::ContentV2sandbox::OrdersGetByMerchantOrderIdResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersGetByMerchantOrderIdResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def getbymerchantorderid_order(merchant_id, merchant_order_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{merchantId}/ordersbymerchantid/{merchantOrderId}', options)
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersGetByMerchantOrderIdResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersGetByMerchantOrderIdResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['merchantOrderId'] = merchant_order_id unless merchant_order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Sandbox only. Retrieves an order template that can be used to quickly create a
|
||||
# new order in sandbox. This method can only be called for non-multi-client
|
||||
# accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] template_name
|
||||
# The name of the template to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::ContentV2sandbox::OrdersGetTestOrderTemplateResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersGetTestOrderTemplateResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def gettestordertemplate_order(merchant_id, template_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{merchantId}/testordertemplates/{templateName}', options)
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersGetTestOrderTemplateResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersGetTestOrderTemplateResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['templateName'] = template_name unless template_name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists the orders in your Merchant Center account. This method can only be
|
||||
# called for non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [Boolean] acknowledged
|
||||
# Obtains orders that match the acknowledgement status. When set to true,
|
||||
# obtains orders that have been acknowledged. When false, obtains orders that
|
||||
# have not been acknowledged.
|
||||
# We recommend using this filter set to false, in conjunction with the
|
||||
# acknowledge call, such that only un-acknowledged orders are returned.
|
||||
# @param [Fixnum] max_results
|
||||
# The maximum number of orders to return in the response, used for paging. The
|
||||
# default value is 25 orders per page, and the maximum allowed value is 250
|
||||
# orders per page.
|
||||
# Known issue: All List calls will return all Orders without limit regardless of
|
||||
# the value of this field.
|
||||
# @param [String] order_by
|
||||
# The ordering of the returned list. The only supported value are placedDate
|
||||
# desc and placedDate asc for now, which returns orders sorted by placement date.
|
||||
# "placedDate desc" stands for listing orders by placement date, from oldest to
|
||||
# most recent. "placedDate asc" stands for listing orders by placement date,
|
||||
# from most recent to oldest. In future releases we'll support other sorting
|
||||
# criteria.
|
||||
# @param [String] page_token
|
||||
# The token returned by the previous request.
|
||||
# @param [String] placed_date_end
|
||||
# Obtains orders placed before this date (exclusively), in ISO 8601 format.
|
||||
# @param [String] placed_date_start
|
||||
# Obtains orders placed after this date (inclusively), in ISO 8601 format.
|
||||
# @param [Array<String>, String] statuses
|
||||
# Obtains orders that match any of the specified statuses. Multiple values can
|
||||
# be specified with comma separation. Additionally, please note that active is a
|
||||
# shortcut for pendingShipment and partiallyShipped, and completed is a shortcut
|
||||
# for shipped , partiallyDelivered, delivered, partiallyReturned, returned, and
|
||||
# canceled.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::ContentV2sandbox::OrdersListResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersListResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_orders(merchant_id, acknowledged: nil, max_results: nil, order_by: nil, page_token: nil, placed_date_end: nil, placed_date_start: nil, statuses: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, '{merchantId}/orders', options)
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersListResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersListResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.query['acknowledged'] = acknowledged unless acknowledged.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['placedDateEnd'] = placed_date_end unless placed_date_end.nil?
|
||||
command.query['placedDateStart'] = placed_date_start unless placed_date_start.nil?
|
||||
command.query['statuses'] = statuses unless statuses.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
|
||||
|
||||
# Refund a portion of the order, up to the full amount paid. This method can
|
||||
# only be called for non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order to refund.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersRefundRequest] orders_refund_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContentV2sandbox::OrdersRefundResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersRefundResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def refund_order(merchant_id, order_id, orders_refund_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/orders/{orderId}/refund', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersRefundRequest::Representation
|
||||
command.request_object = orders_refund_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersRefundResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersRefundResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns a line item. This method can only be called for non-multi-client
|
||||
# accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersReturnLineItemRequest] orders_return_line_item_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# 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::ContentV2sandbox::OrdersReturnLineItemResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersReturnLineItemResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def returnlineitem_order(merchant_id, order_id, orders_return_line_item_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/orders/{orderId}/returnLineItem', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersReturnLineItemRequest::Representation
|
||||
command.request_object = orders_return_line_item_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersReturnLineItemResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersReturnLineItemResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Marks line item(s) as shipped. This method can only be called for non-multi-
|
||||
# client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersShipLineItemsRequest] orders_ship_line_items_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContentV2sandbox::OrdersShipLineItemsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersShipLineItemsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def shiplineitems_order(merchant_id, order_id, orders_ship_line_items_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/orders/{orderId}/shipLineItems', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersShipLineItemsRequest::Representation
|
||||
command.request_object = orders_ship_line_items_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersShipLineItemsResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersShipLineItemsResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the merchant order ID for a given order. This method can only be
|
||||
# called for non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersUpdateMerchantOrderIdRequest] orders_update_merchant_order_id_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContentV2sandbox::OrdersUpdateMerchantOrderIdResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersUpdateMerchantOrderIdResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def updatemerchantorderid_order(merchant_id, order_id, orders_update_merchant_order_id_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/orders/{orderId}/updateMerchantOrderId', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersUpdateMerchantOrderIdRequest::Representation
|
||||
command.request_object = orders_update_merchant_order_id_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersUpdateMerchantOrderIdResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersUpdateMerchantOrderIdResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates a shipment's status, carrier, and/or tracking ID. This method can only
|
||||
# be called for non-multi-client accounts.
|
||||
# @param [Fixnum] merchant_id
|
||||
# The ID of the managing account.
|
||||
# @param [String] order_id
|
||||
# The ID of the order.
|
||||
# @param [Google::Apis::ContentV2sandbox::OrdersUpdateShipmentRequest] orders_update_shipment_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContentV2sandbox::OrdersUpdateShipmentResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContentV2sandbox::OrdersUpdateShipmentResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def updateshipment_order(merchant_id, order_id, orders_update_shipment_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, '{merchantId}/orders/{orderId}/updateShipment', options)
|
||||
command.request_representation = Google::Apis::ContentV2sandbox::OrdersUpdateShipmentRequest::Representation
|
||||
command.request_object = orders_update_shipment_request_object
|
||||
command.response_representation = Google::Apis::ContentV2sandbox::OrdersUpdateShipmentResponse::Representation
|
||||
command.response_class = Google::Apis::ContentV2sandbox::OrdersUpdateShipmentResponse
|
||||
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
||||
command.params['orderId'] = order_id unless order_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/dataproc_v1beta2/service.rb'
|
||||
require 'google/apis/dataproc_v1beta2/classes.rb'
|
||||
require 'google/apis/dataproc_v1beta2/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Cloud Dataproc API
|
||||
#
|
||||
# Manages Hadoop-based clusters and jobs on Google Cloud Platform.
|
||||
#
|
||||
# @see https://cloud.google.com/dataproc/
|
||||
module DataprocV1beta2
|
||||
VERSION = 'V1beta2'
|
||||
REVISION = '20170822'
|
||||
|
||||
# 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
|
@ -0,0 +1,675 @@
|
|||
# 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 DataprocV1beta2
|
||||
|
||||
class AcceleratorConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CancelJobRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Cluster
|
||||
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 ClusterMetrics
|
||||
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 ClusterOperationStatus
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ClusterStatus
|
||||
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 DiagnoseClusterResults
|
||||
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 Empty
|
||||
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 HadoopJob
|
||||
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 InstanceGroupConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Job
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class JobPlacement
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class JobReference
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class JobScheduling
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class JobStatus
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LifecycleConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListClustersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListJobsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LoggingConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ManagedGroupConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NodeInitializationAction
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PigJob
|
||||
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 QueryList
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SoftwareConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SparkJob
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SparkSqlJob
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SubmitJobRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class YarnApplication
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AcceleratorConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :accelerator_count, as: 'acceleratorCount'
|
||||
property :accelerator_type_uri, as: 'acceleratorTypeUri'
|
||||
end
|
||||
end
|
||||
|
||||
class CancelJobRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class Cluster
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_name, as: 'clusterName'
|
||||
property :cluster_uuid, as: 'clusterUuid'
|
||||
property :config, as: 'config', class: Google::Apis::DataprocV1beta2::ClusterConfig, decorator: Google::Apis::DataprocV1beta2::ClusterConfig::Representation
|
||||
|
||||
hash :labels, as: 'labels'
|
||||
property :metrics, as: 'metrics', class: Google::Apis::DataprocV1beta2::ClusterMetrics, decorator: Google::Apis::DataprocV1beta2::ClusterMetrics::Representation
|
||||
|
||||
property :project_id, as: 'projectId'
|
||||
property :status, as: 'status', class: Google::Apis::DataprocV1beta2::ClusterStatus, decorator: Google::Apis::DataprocV1beta2::ClusterStatus::Representation
|
||||
|
||||
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1beta2::ClusterStatus, decorator: Google::Apis::DataprocV1beta2::ClusterStatus::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ClusterConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :config_bucket, as: 'configBucket'
|
||||
property :gce_cluster_config, as: 'gceClusterConfig', class: Google::Apis::DataprocV1beta2::GceClusterConfig, decorator: Google::Apis::DataprocV1beta2::GceClusterConfig::Representation
|
||||
|
||||
collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1beta2::NodeInitializationAction, decorator: Google::Apis::DataprocV1beta2::NodeInitializationAction::Representation
|
||||
|
||||
property :lifecycle_config, as: 'lifecycleConfig', class: Google::Apis::DataprocV1beta2::LifecycleConfig, decorator: Google::Apis::DataprocV1beta2::LifecycleConfig::Representation
|
||||
|
||||
property :master_config, as: 'masterConfig', class: Google::Apis::DataprocV1beta2::InstanceGroupConfig, decorator: Google::Apis::DataprocV1beta2::InstanceGroupConfig::Representation
|
||||
|
||||
property :secondary_worker_config, as: 'secondaryWorkerConfig', class: Google::Apis::DataprocV1beta2::InstanceGroupConfig, decorator: Google::Apis::DataprocV1beta2::InstanceGroupConfig::Representation
|
||||
|
||||
property :software_config, as: 'softwareConfig', class: Google::Apis::DataprocV1beta2::SoftwareConfig, decorator: Google::Apis::DataprocV1beta2::SoftwareConfig::Representation
|
||||
|
||||
property :worker_config, as: 'workerConfig', class: Google::Apis::DataprocV1beta2::InstanceGroupConfig, decorator: Google::Apis::DataprocV1beta2::InstanceGroupConfig::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ClusterMetrics
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :hdfs_metrics, as: 'hdfsMetrics'
|
||||
hash :yarn_metrics, as: 'yarnMetrics'
|
||||
end
|
||||
end
|
||||
|
||||
class ClusterOperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_name, as: 'clusterName'
|
||||
property :cluster_uuid, as: 'clusterUuid'
|
||||
property :description, as: 'description'
|
||||
hash :labels, as: 'labels'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :status, as: 'status', class: Google::Apis::DataprocV1beta2::ClusterOperationStatus, decorator: Google::Apis::DataprocV1beta2::ClusterOperationStatus::Representation
|
||||
|
||||
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1beta2::ClusterOperationStatus, decorator: Google::Apis::DataprocV1beta2::ClusterOperationStatus::Representation
|
||||
|
||||
collection :warnings, as: 'warnings'
|
||||
end
|
||||
end
|
||||
|
||||
class ClusterOperationStatus
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :details, as: 'details'
|
||||
property :inner_state, as: 'innerState'
|
||||
property :state, as: 'state'
|
||||
property :state_start_time, as: 'stateStartTime'
|
||||
end
|
||||
end
|
||||
|
||||
class ClusterStatus
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :detail, as: 'detail'
|
||||
property :state, as: 'state'
|
||||
property :state_start_time, as: 'stateStartTime'
|
||||
property :substate, as: 'substate'
|
||||
end
|
||||
end
|
||||
|
||||
class DiagnoseClusterRequest
|
||||
# @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 DiskConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :boot_disk_size_gb, as: 'bootDiskSizeGb'
|
||||
property :num_local_ssds, as: 'numLocalSsds'
|
||||
end
|
||||
end
|
||||
|
||||
class Empty
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class GceClusterConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :internal_ip_only, as: 'internalIpOnly'
|
||||
hash :metadata, as: 'metadata'
|
||||
property :network_uri, as: 'networkUri'
|
||||
property :service_account, as: 'serviceAccount'
|
||||
collection :service_account_scopes, as: 'serviceAccountScopes'
|
||||
property :subnetwork_uri, as: 'subnetworkUri'
|
||||
collection :tags, as: 'tags'
|
||||
property :zone_uri, as: 'zoneUri'
|
||||
end
|
||||
end
|
||||
|
||||
class HadoopJob
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :archive_uris, as: 'archiveUris'
|
||||
collection :args, as: 'args'
|
||||
collection :file_uris, as: 'fileUris'
|
||||
collection :jar_file_uris, as: 'jarFileUris'
|
||||
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1beta2::LoggingConfig, decorator: Google::Apis::DataprocV1beta2::LoggingConfig::Representation
|
||||
|
||||
property :main_class, as: 'mainClass'
|
||||
property :main_jar_file_uri, as: 'mainJarFileUri'
|
||||
hash :properties, as: 'properties'
|
||||
end
|
||||
end
|
||||
|
||||
class HiveJob
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :continue_on_failure, as: 'continueOnFailure'
|
||||
collection :jar_file_uris, as: 'jarFileUris'
|
||||
hash :properties, as: 'properties'
|
||||
property :query_file_uri, as: 'queryFileUri'
|
||||
property :query_list, as: 'queryList', class: Google::Apis::DataprocV1beta2::QueryList, decorator: Google::Apis::DataprocV1beta2::QueryList::Representation
|
||||
|
||||
hash :script_variables, as: 'scriptVariables'
|
||||
end
|
||||
end
|
||||
|
||||
class InstanceGroupConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :accelerators, as: 'accelerators', class: Google::Apis::DataprocV1beta2::AcceleratorConfig, decorator: Google::Apis::DataprocV1beta2::AcceleratorConfig::Representation
|
||||
|
||||
property :disk_config, as: 'diskConfig', class: Google::Apis::DataprocV1beta2::DiskConfig, decorator: Google::Apis::DataprocV1beta2::DiskConfig::Representation
|
||||
|
||||
property :image_uri, as: 'imageUri'
|
||||
collection :instance_names, as: 'instanceNames'
|
||||
property :is_preemptible, as: 'isPreemptible'
|
||||
property :machine_type_uri, as: 'machineTypeUri'
|
||||
property :managed_group_config, as: 'managedGroupConfig', class: Google::Apis::DataprocV1beta2::ManagedGroupConfig, decorator: Google::Apis::DataprocV1beta2::ManagedGroupConfig::Representation
|
||||
|
||||
property :num_instances, as: 'numInstances'
|
||||
end
|
||||
end
|
||||
|
||||
class Job
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :driver_control_files_uri, as: 'driverControlFilesUri'
|
||||
property :driver_output_resource_uri, as: 'driverOutputResourceUri'
|
||||
property :hadoop_job, as: 'hadoopJob', class: Google::Apis::DataprocV1beta2::HadoopJob, decorator: Google::Apis::DataprocV1beta2::HadoopJob::Representation
|
||||
|
||||
property :hive_job, as: 'hiveJob', class: Google::Apis::DataprocV1beta2::HiveJob, decorator: Google::Apis::DataprocV1beta2::HiveJob::Representation
|
||||
|
||||
hash :labels, as: 'labels'
|
||||
property :pig_job, as: 'pigJob', class: Google::Apis::DataprocV1beta2::PigJob, decorator: Google::Apis::DataprocV1beta2::PigJob::Representation
|
||||
|
||||
property :placement, as: 'placement', class: Google::Apis::DataprocV1beta2::JobPlacement, decorator: Google::Apis::DataprocV1beta2::JobPlacement::Representation
|
||||
|
||||
property :pyspark_job, as: 'pysparkJob', class: Google::Apis::DataprocV1beta2::PySparkJob, decorator: Google::Apis::DataprocV1beta2::PySparkJob::Representation
|
||||
|
||||
property :reference, as: 'reference', class: Google::Apis::DataprocV1beta2::JobReference, decorator: Google::Apis::DataprocV1beta2::JobReference::Representation
|
||||
|
||||
property :scheduling, as: 'scheduling', class: Google::Apis::DataprocV1beta2::JobScheduling, decorator: Google::Apis::DataprocV1beta2::JobScheduling::Representation
|
||||
|
||||
property :spark_job, as: 'sparkJob', class: Google::Apis::DataprocV1beta2::SparkJob, decorator: Google::Apis::DataprocV1beta2::SparkJob::Representation
|
||||
|
||||
property :spark_sql_job, as: 'sparkSqlJob', class: Google::Apis::DataprocV1beta2::SparkSqlJob, decorator: Google::Apis::DataprocV1beta2::SparkSqlJob::Representation
|
||||
|
||||
property :status, as: 'status', class: Google::Apis::DataprocV1beta2::JobStatus, decorator: Google::Apis::DataprocV1beta2::JobStatus::Representation
|
||||
|
||||
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1beta2::JobStatus, decorator: Google::Apis::DataprocV1beta2::JobStatus::Representation
|
||||
|
||||
collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1beta2::YarnApplication, decorator: Google::Apis::DataprocV1beta2::YarnApplication::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class JobPlacement
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_name, as: 'clusterName'
|
||||
property :cluster_uuid, as: 'clusterUuid'
|
||||
end
|
||||
end
|
||||
|
||||
class JobReference
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :job_id, as: 'jobId'
|
||||
property :project_id, as: 'projectId'
|
||||
end
|
||||
end
|
||||
|
||||
class JobScheduling
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :max_failures_per_hour, as: 'maxFailuresPerHour'
|
||||
end
|
||||
end
|
||||
|
||||
class JobStatus
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :details, as: 'details'
|
||||
property :state, as: 'state'
|
||||
property :state_start_time, as: 'stateStartTime'
|
||||
property :substate, as: 'substate'
|
||||
end
|
||||
end
|
||||
|
||||
class LifecycleConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :auto_delete_time, as: 'autoDeleteTime'
|
||||
property :auto_delete_ttl, as: 'autoDeleteTtl'
|
||||
property :idle_delete_ttl, as: 'idleDeleteTtl'
|
||||
end
|
||||
end
|
||||
|
||||
class ListClustersResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :clusters, as: 'clusters', class: Google::Apis::DataprocV1beta2::Cluster, decorator: Google::Apis::DataprocV1beta2::Cluster::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListJobsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :jobs, as: 'jobs', class: Google::Apis::DataprocV1beta2::Job, decorator: Google::Apis::DataprocV1beta2::Job::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :operations, as: 'operations', class: Google::Apis::DataprocV1beta2::Operation, decorator: Google::Apis::DataprocV1beta2::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LoggingConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :driver_log_levels, as: 'driverLogLevels'
|
||||
end
|
||||
end
|
||||
|
||||
class ManagedGroupConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :instance_group_manager_name, as: 'instanceGroupManagerName'
|
||||
property :instance_template_name, as: 'instanceTemplateName'
|
||||
end
|
||||
end
|
||||
|
||||
class NodeInitializationAction
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :executable_file, as: 'executableFile'
|
||||
property :execution_timeout, as: 'executionTimeout'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
property :error, as: 'error', class: Google::Apis::DataprocV1beta2::Status, decorator: Google::Apis::DataprocV1beta2::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
class PigJob
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :continue_on_failure, as: 'continueOnFailure'
|
||||
collection :jar_file_uris, as: 'jarFileUris'
|
||||
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1beta2::LoggingConfig, decorator: Google::Apis::DataprocV1beta2::LoggingConfig::Representation
|
||||
|
||||
hash :properties, as: 'properties'
|
||||
property :query_file_uri, as: 'queryFileUri'
|
||||
property :query_list, as: 'queryList', class: Google::Apis::DataprocV1beta2::QueryList, decorator: Google::Apis::DataprocV1beta2::QueryList::Representation
|
||||
|
||||
hash :script_variables, as: 'scriptVariables'
|
||||
end
|
||||
end
|
||||
|
||||
class PySparkJob
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :archive_uris, as: 'archiveUris'
|
||||
collection :args, as: 'args'
|
||||
collection :file_uris, as: 'fileUris'
|
||||
collection :jar_file_uris, as: 'jarFileUris'
|
||||
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1beta2::LoggingConfig, decorator: Google::Apis::DataprocV1beta2::LoggingConfig::Representation
|
||||
|
||||
property :main_python_file_uri, as: 'mainPythonFileUri'
|
||||
hash :properties, as: 'properties'
|
||||
collection :python_file_uris, as: 'pythonFileUris'
|
||||
end
|
||||
end
|
||||
|
||||
class QueryList
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :queries, as: 'queries'
|
||||
end
|
||||
end
|
||||
|
||||
class SoftwareConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :image_version, as: 'imageVersion'
|
||||
hash :properties, as: 'properties'
|
||||
end
|
||||
end
|
||||
|
||||
class SparkJob
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :archive_uris, as: 'archiveUris'
|
||||
collection :args, as: 'args'
|
||||
collection :file_uris, as: 'fileUris'
|
||||
collection :jar_file_uris, as: 'jarFileUris'
|
||||
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1beta2::LoggingConfig, decorator: Google::Apis::DataprocV1beta2::LoggingConfig::Representation
|
||||
|
||||
property :main_class, as: 'mainClass'
|
||||
property :main_jar_file_uri, as: 'mainJarFileUri'
|
||||
hash :properties, as: 'properties'
|
||||
end
|
||||
end
|
||||
|
||||
class SparkSqlJob
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :jar_file_uris, as: 'jarFileUris'
|
||||
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1beta2::LoggingConfig, decorator: Google::Apis::DataprocV1beta2::LoggingConfig::Representation
|
||||
|
||||
hash :properties, as: 'properties'
|
||||
property :query_file_uri, as: 'queryFileUri'
|
||||
property :query_list, as: 'queryList', class: Google::Apis::DataprocV1beta2::QueryList, decorator: Google::Apis::DataprocV1beta2::QueryList::Representation
|
||||
|
||||
hash :script_variables, as: 'scriptVariables'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
|
||||
class SubmitJobRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :job, as: 'job', class: Google::Apis::DataprocV1beta2::Job, decorator: Google::Apis::DataprocV1beta2::Job::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class YarnApplication
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :progress, as: 'progress'
|
||||
property :state, as: 'state'
|
||||
property :tracking_url, as: 'trackingUrl'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,739 @@
|
|||
# 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 DataprocV1beta2
|
||||
# Google Cloud Dataproc API
|
||||
#
|
||||
# Manages Hadoop-based clusters and jobs on Google Cloud Platform.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/dataproc_v1beta2'
|
||||
#
|
||||
# Dataproc = Google::Apis::DataprocV1beta2 # Alias the module
|
||||
# service = Dataproc::DataprocService.new
|
||||
#
|
||||
# @see https://cloud.google.com/dataproc/
|
||||
class DataprocService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://dataproc.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Creates a cluster in a project.
|
||||
# @param [String] project_id
|
||||
# Required. The ID of the Google Cloud Platform project that the cluster belongs
|
||||
# to.
|
||||
# @param [String] region
|
||||
# Required. The Cloud Dataproc region in which to handle the request.
|
||||
# @param [Google::Apis::DataprocV1beta2::Cluster] cluster_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::DataprocV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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_region_cluster(project_id, region, cluster_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/clusters', options)
|
||||
command.request_representation = Google::Apis::DataprocV1beta2::Cluster::Representation
|
||||
command.request_object = cluster_object
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::Operation
|
||||
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 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::DataprocV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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_project_region_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::Operation
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['region'] = region unless region.nil?
|
||||
command.params['clusterName'] = cluster_name unless cluster_name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets cluster diagnostic information. After the operation completes, the
|
||||
# Operation.response field contains DiagnoseClusterOutputLocation.
|
||||
# @param [String] project_id
|
||||
# Required. The ID of the Google Cloud Platform project that the cluster belongs
|
||||
# to.
|
||||
# @param [String] region
|
||||
# Required. The Cloud Dataproc region in which to handle the request.
|
||||
# @param [String] cluster_name
|
||||
# Required. The cluster name.
|
||||
# @param [Google::Apis::DataprocV1beta2::DiagnoseClusterRequest] diagnose_cluster_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', options)
|
||||
command.request_representation = Google::Apis::DataprocV1beta2::DiagnoseClusterRequest::Representation
|
||||
command.request_object = diagnose_cluster_request_object
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::Operation
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['region'] = region unless region.nil?
|
||||
command.params['clusterName'] = cluster_name unless cluster_name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the resource representation for a cluster in a project.
|
||||
# @param [String] project_id
|
||||
# Required. The ID of the Google Cloud Platform project that the cluster belongs
|
||||
# to.
|
||||
# @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::DataprocV1beta2::Cluster] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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_project_region_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Cluster::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::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
|
||||
|
||||
# Lists all regions/`region`/clusters in a project.
|
||||
# @param [String] project_id
|
||||
# Required. The ID of the Google Cloud Platform project that the cluster belongs
|
||||
# to.
|
||||
# @param [String] region
|
||||
# Required. The Cloud Dataproc region in which to handle the request.
|
||||
# @param [String] filter
|
||||
# Optional. A filter constraining the clusters to list. Filters are case-
|
||||
# sensitive and have the following syntax:field = value AND field = value ...
|
||||
# where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is
|
||||
# a label key. value can be * to match all values. status.state can be one of
|
||||
# the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or
|
||||
# UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE
|
||||
# contains the DELETING and ERROR states. clusterName is the name of the cluster
|
||||
# provided at creation time. Only the logical AND operator is supported; space-
|
||||
# separated items are treated as having an implicit AND operator.Example filter:
|
||||
# status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND
|
||||
# labels.starred = *
|
||||
# @param [Fixnum] page_size
|
||||
# Optional. The standard List page size.
|
||||
# @param [String] page_token
|
||||
# Optional. The standard List page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DataprocV1beta2::ListClustersResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::ListClustersResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_project_region_clusters(project_id, region, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/projects/{projectId}/regions/{region}/clusters', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::ListClustersResponse::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::ListClustersResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['region'] = region unless region.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# 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::DataprocV1beta2::Cluster] cluster_object
|
||||
# @param [String] graceful_decommission_timeout
|
||||
# Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning
|
||||
# allows removing nodes from the cluster without interrupting jobs in progress.
|
||||
# Timeout specifies how long to wait for jobs in progress to finish before
|
||||
# forcefully removing nodes (and potentially interrupting jobs). Default timeout
|
||||
# is 0 (for forceful decommission), and the maximum allowed timeout is 1 day.
|
||||
# Only supported on Dataproc image versions 1.2 and higher.
|
||||
# @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 only some fields can be updated: |Mask|
|
||||
# Purpose| |labels|Updates labels| |config.worker_config.num_instances|Resize
|
||||
# primary worker group| |config.secondary_worker_config.num_instances|Resize
|
||||
# secondary worker group|
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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_project_region_cluster(project_id, region, cluster_name, cluster_object = nil, graceful_decommission_timeout: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
|
||||
command.request_representation = Google::Apis::DataprocV1beta2::Cluster::Representation
|
||||
command.request_object = cluster_object
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::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['gracefulDecommissionTimeout'] = graceful_decommission_timeout unless graceful_decommission_timeout.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
|
||||
|
||||
# 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::DataprocV1beta2::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::DataprocV1beta2::Job] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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, 'v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options)
|
||||
command.request_representation = Google::Apis::DataprocV1beta2::CancelJobRequest::Representation
|
||||
command.request_object = cancel_job_request_object
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Job::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::Job
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['region'] = region unless region.nil?
|
||||
command.params['jobId'] = job_id unless job_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes the job from the project. If the job is active, the delete fails, and
|
||||
# the response returns FAILED_PRECONDITION.
|
||||
# @param [String] project_id
|
||||
# Required. The ID of the Google Cloud Platform project that the job belongs to.
|
||||
# @param [String] region
|
||||
# Required. The Cloud Dataproc region in which to handle the request.
|
||||
# @param [String] job_id
|
||||
# Required. The job ID.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::DataprocV1beta2::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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_region_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::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
|
||||
|
||||
# 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::DataprocV1beta2::Job] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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_project_region_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Job::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::Job
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['region'] = region unless region.nil?
|
||||
command.params['jobId'] = job_id unless job_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists regions/`region`/jobs in a project.
|
||||
# @param [String] project_id
|
||||
# Required. The ID of the Google Cloud Platform project that the job belongs to.
|
||||
# @param [String] region
|
||||
# Required. The Cloud Dataproc region in which to handle the request.
|
||||
# @param [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 [Fixnum] page_size
|
||||
# Optional. The number of results to return in each response.
|
||||
# @param [String] page_token
|
||||
# Optional. The page token, returned by a previous call, to request the next
|
||||
# page of results.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to 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::DataprocV1beta2::ListJobsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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_project_region_jobs(project_id, region, cluster_name: nil, filter: nil, job_state_matcher: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/projects/{projectId}/regions/{region}/jobs', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::ListJobsResponse::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::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['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates a 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::DataprocV1beta2::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::DataprocV1beta2::Job] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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, 'v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
|
||||
command.request_representation = Google::Apis::DataprocV1beta2::Job::Representation
|
||||
command.request_object = job_object
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Job::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::Job
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['region'] = region unless region.nil?
|
||||
command.params['jobId'] = job_id unless job_id.nil?
|
||||
command.query['updateMask'] = update_mask unless update_mask.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Submits a job to a cluster.
|
||||
# @param [String] project_id
|
||||
# Required. The ID of the Google Cloud Platform project that the job belongs to.
|
||||
# @param [String] region
|
||||
# Required. The Cloud Dataproc region in which to handle the request.
|
||||
# @param [Google::Apis::DataprocV1beta2::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::DataprocV1beta2::Job] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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, 'v1beta2/projects/{projectId}/regions/{region}/jobs:submit', options)
|
||||
command.request_representation = Google::Apis::DataprocV1beta2::SubmitJobRequest::Representation
|
||||
command.request_object = submit_job_request_object
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Job::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::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
|
||||
|
||||
# Starts asynchronous cancellation on a long-running operation. The server makes
|
||||
# a best effort to cancel the operation, but success is not guaranteed. If the
|
||||
# server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
|
||||
# Clients can use Operations.GetOperation or other methods to check whether the
|
||||
# cancellation succeeded or whether the operation completed despite cancellation.
|
||||
# On successful cancellation, the operation is not deleted; instead, it becomes
|
||||
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
||||
# corresponding to Code.CANCELLED.
|
||||
# @param [String] name
|
||||
# The name of the operation resource to be cancelled.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::Empty]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def cancel_project_region_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta2/{+name}:cancel', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::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
|
||||
|
||||
# Deletes a long-running operation. This method indicates that the client is no
|
||||
# longer interested in the operation result. It does not cancel the operation.
|
||||
# If the server doesn't support this method, it returns google.rpc.Code.
|
||||
# UNIMPLEMENTED.
|
||||
# @param [String] name
|
||||
# The name of the operation resource to be deleted.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DataprocV1beta2::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::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_region_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1beta2/{+name}', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Empty::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::Empty
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the latest state of a long-running operation. Clients can use this method
|
||||
# to poll the operation result at intervals as recommended by the API service.
|
||||
# @param [String] name
|
||||
# The name of the operation resource.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DataprocV1beta2::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_region_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/{+name}', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::Operation::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::Operation
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists operations that match the specified filter in the request. If the server
|
||||
# doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
|
||||
# allows API services to override the binding to use different resource name
|
||||
# schemes, such as users/*/operations. To override the binding, API services can
|
||||
# add a binding such as "/v1/`name=users/*`/operations" to their service
|
||||
# configuration. For backwards compatibility, the default name includes the
|
||||
# operations collection id, however overriding users must ensure the name
|
||||
# binding is the parent resource, without the operations collection id.
|
||||
# @param [String] name
|
||||
# The name of the operation's parent resource.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DataprocV1beta2::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DataprocV1beta2::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_project_region_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1beta2/{+name}', options)
|
||||
command.response_representation = Google::Apis::DataprocV1beta2::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::DataprocV1beta2::ListOperationsResponse
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,38 @@
|
|||
# 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/datastore_v1beta3/service.rb'
|
||||
require 'google/apis/datastore_v1beta3/classes.rb'
|
||||
require 'google/apis/datastore_v1beta3/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Cloud Datastore API
|
||||
#
|
||||
# Accesses the schemaless NoSQL database to provide fully managed, robust,
|
||||
# scalable storage for your application.
|
||||
#
|
||||
# @see https://cloud.google.com/datastore/
|
||||
module DatastoreV1beta3
|
||||
VERSION = 'V1beta3'
|
||||
REVISION = '20170811'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
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
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,715 @@
|
|||
# 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 DatastoreV1beta3
|
||||
|
||||
class AllocateIdsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AllocateIdsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ArrayValue
|
||||
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 BeginTransactionResponse
|
||||
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 CommitResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CompositeFilter
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Entity
|
||||
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 Filter
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1CommonMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1EntityFilter
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1ExportEntitiesMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1ExportEntitiesResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1Progress
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GqlQuery
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GqlQueryParameter
|
||||
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 KindExpression
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LatLng
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LookupRequest
|
||||
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 Mutation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MutationResult
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PartitionId
|
||||
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 Projection
|
||||
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 PropertyOrder
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PropertyReference
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Query
|
||||
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 ReadOnly
|
||||
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 ReadWrite
|
||||
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 RollbackResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class RunQueryRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class RunQueryResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TransactionOptions
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Value
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AllocateIdsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :keys, as: 'keys', class: Google::Apis::DatastoreV1beta3::Key, decorator: Google::Apis::DatastoreV1beta3::Key::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class AllocateIdsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :keys, as: 'keys', class: Google::Apis::DatastoreV1beta3::Key, decorator: Google::Apis::DatastoreV1beta3::Key::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ArrayValue
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :values, as: 'values', class: Google::Apis::DatastoreV1beta3::Value, decorator: Google::Apis::DatastoreV1beta3::Value::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class BeginTransactionRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :transaction_options, as: 'transactionOptions', class: Google::Apis::DatastoreV1beta3::TransactionOptions, decorator: Google::Apis::DatastoreV1beta3::TransactionOptions::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class BeginTransactionResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :transaction, :base64 => true, as: 'transaction'
|
||||
end
|
||||
end
|
||||
|
||||
class CommitRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :mode, as: 'mode'
|
||||
collection :mutations, as: 'mutations', class: Google::Apis::DatastoreV1beta3::Mutation, decorator: Google::Apis::DatastoreV1beta3::Mutation::Representation
|
||||
|
||||
property :transaction, :base64 => true, as: 'transaction'
|
||||
end
|
||||
end
|
||||
|
||||
class CommitResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :index_updates, as: 'indexUpdates'
|
||||
collection :mutation_results, as: 'mutationResults', class: Google::Apis::DatastoreV1beta3::MutationResult, decorator: Google::Apis::DatastoreV1beta3::MutationResult::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class CompositeFilter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :filters, as: 'filters', class: Google::Apis::DatastoreV1beta3::Filter, decorator: Google::Apis::DatastoreV1beta3::Filter::Representation
|
||||
|
||||
property :op, as: 'op'
|
||||
end
|
||||
end
|
||||
|
||||
class Entity
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :key, as: 'key', class: Google::Apis::DatastoreV1beta3::Key, decorator: Google::Apis::DatastoreV1beta3::Key::Representation
|
||||
|
||||
hash :properties, as: 'properties', class: Google::Apis::DatastoreV1beta3::Value, decorator: Google::Apis::DatastoreV1beta3::Value::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class EntityResult
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cursor, :base64 => true, as: 'cursor'
|
||||
property :entity, as: 'entity', class: Google::Apis::DatastoreV1beta3::Entity, decorator: Google::Apis::DatastoreV1beta3::Entity::Representation
|
||||
|
||||
property :version, :numeric_string => true, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class Filter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :composite_filter, as: 'compositeFilter', class: Google::Apis::DatastoreV1beta3::CompositeFilter, decorator: Google::Apis::DatastoreV1beta3::CompositeFilter::Representation
|
||||
|
||||
property :property_filter, as: 'propertyFilter', class: Google::Apis::DatastoreV1beta3::PropertyFilter, decorator: Google::Apis::DatastoreV1beta3::PropertyFilter::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1CommonMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_time, as: 'endTime'
|
||||
hash :labels, as: 'labels'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :start_time, as: 'startTime'
|
||||
property :state, as: 'state'
|
||||
end
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1EntityFilter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :kinds, as: 'kinds'
|
||||
collection :namespace_ids, as: 'namespaceIds'
|
||||
end
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1ExportEntitiesMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :common, as: 'common', class: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1CommonMetadata, decorator: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1CommonMetadata::Representation
|
||||
|
||||
property :entity_filter, as: 'entityFilter', class: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1EntityFilter, decorator: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1EntityFilter::Representation
|
||||
|
||||
property :output_url_prefix, as: 'outputUrlPrefix'
|
||||
property :progress_bytes, as: 'progressBytes', class: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress, decorator: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress::Representation
|
||||
|
||||
property :progress_entities, as: 'progressEntities', class: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress, decorator: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1ExportEntitiesResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :output_url, as: 'outputUrl'
|
||||
end
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :common, as: 'common', class: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1CommonMetadata, decorator: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1CommonMetadata::Representation
|
||||
|
||||
property :entity_filter, as: 'entityFilter', class: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1EntityFilter, decorator: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1EntityFilter::Representation
|
||||
|
||||
property :input_url, as: 'inputUrl'
|
||||
property :progress_bytes, as: 'progressBytes', class: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress, decorator: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress::Representation
|
||||
|
||||
property :progress_entities, as: 'progressEntities', class: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress, decorator: Google::Apis::DatastoreV1beta3::GoogleDatastoreAdminV1beta1Progress::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class GoogleDatastoreAdminV1beta1Progress
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :work_completed, :numeric_string => true, as: 'workCompleted'
|
||||
property :work_estimated, :numeric_string => true, as: 'workEstimated'
|
||||
end
|
||||
end
|
||||
|
||||
class GqlQuery
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :allow_literals, as: 'allowLiterals'
|
||||
hash :named_bindings, as: 'namedBindings', class: Google::Apis::DatastoreV1beta3::GqlQueryParameter, decorator: Google::Apis::DatastoreV1beta3::GqlQueryParameter::Representation
|
||||
|
||||
collection :positional_bindings, as: 'positionalBindings', class: Google::Apis::DatastoreV1beta3::GqlQueryParameter, decorator: Google::Apis::DatastoreV1beta3::GqlQueryParameter::Representation
|
||||
|
||||
property :query_string, as: 'queryString'
|
||||
end
|
||||
end
|
||||
|
||||
class GqlQueryParameter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cursor, :base64 => true, as: 'cursor'
|
||||
property :value, as: 'value', class: Google::Apis::DatastoreV1beta3::Value, decorator: Google::Apis::DatastoreV1beta3::Value::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Key
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :partition_id, as: 'partitionId', class: Google::Apis::DatastoreV1beta3::PartitionId, decorator: Google::Apis::DatastoreV1beta3::PartitionId::Representation
|
||||
|
||||
collection :path, as: 'path', class: Google::Apis::DatastoreV1beta3::PathElement, decorator: Google::Apis::DatastoreV1beta3::PathElement::Representation
|
||||
|
||||
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 :latitude, as: 'latitude'
|
||||
property :longitude, as: 'longitude'
|
||||
end
|
||||
end
|
||||
|
||||
class LookupRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :keys, as: 'keys', class: Google::Apis::DatastoreV1beta3::Key, decorator: Google::Apis::DatastoreV1beta3::Key::Representation
|
||||
|
||||
property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1beta3::ReadOptions, decorator: Google::Apis::DatastoreV1beta3::ReadOptions::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class LookupResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :deferred, as: 'deferred', class: Google::Apis::DatastoreV1beta3::Key, decorator: Google::Apis::DatastoreV1beta3::Key::Representation
|
||||
|
||||
collection :found, as: 'found', class: Google::Apis::DatastoreV1beta3::EntityResult, decorator: Google::Apis::DatastoreV1beta3::EntityResult::Representation
|
||||
|
||||
collection :missing, as: 'missing', class: Google::Apis::DatastoreV1beta3::EntityResult, decorator: Google::Apis::DatastoreV1beta3::EntityResult::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Mutation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :base_version, :numeric_string => true, as: 'baseVersion'
|
||||
property :delete, as: 'delete', class: Google::Apis::DatastoreV1beta3::Key, decorator: Google::Apis::DatastoreV1beta3::Key::Representation
|
||||
|
||||
property :insert, as: 'insert', class: Google::Apis::DatastoreV1beta3::Entity, decorator: Google::Apis::DatastoreV1beta3::Entity::Representation
|
||||
|
||||
property :update, as: 'update', class: Google::Apis::DatastoreV1beta3::Entity, decorator: Google::Apis::DatastoreV1beta3::Entity::Representation
|
||||
|
||||
property :upsert, as: 'upsert', class: Google::Apis::DatastoreV1beta3::Entity, decorator: Google::Apis::DatastoreV1beta3::Entity::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class MutationResult
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :conflict_detected, as: 'conflictDetected'
|
||||
property :key, as: 'key', class: Google::Apis::DatastoreV1beta3::Key, decorator: Google::Apis::DatastoreV1beta3::Key::Representation
|
||||
|
||||
property :version, :numeric_string => true, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class PartitionId
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :namespace_id, as: 'namespaceId'
|
||||
property :project_id, as: 'projectId'
|
||||
end
|
||||
end
|
||||
|
||||
class PathElement
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, :numeric_string => true, as: 'id'
|
||||
property :kind, as: 'kind'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class Projection
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :property, as: 'property', class: Google::Apis::DatastoreV1beta3::PropertyReference, decorator: Google::Apis::DatastoreV1beta3::PropertyReference::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class PropertyFilter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :op, as: 'op'
|
||||
property :property, as: 'property', class: Google::Apis::DatastoreV1beta3::PropertyReference, decorator: Google::Apis::DatastoreV1beta3::PropertyReference::Representation
|
||||
|
||||
property :value, as: 'value', class: Google::Apis::DatastoreV1beta3::Value, decorator: Google::Apis::DatastoreV1beta3::Value::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class PropertyOrder
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :direction, as: 'direction'
|
||||
property :property, as: 'property', class: Google::Apis::DatastoreV1beta3::PropertyReference, decorator: Google::Apis::DatastoreV1beta3::PropertyReference::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class PropertyReference
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class Query
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :distinct_on, as: 'distinctOn', class: Google::Apis::DatastoreV1beta3::PropertyReference, decorator: Google::Apis::DatastoreV1beta3::PropertyReference::Representation
|
||||
|
||||
property :end_cursor, :base64 => true, as: 'endCursor'
|
||||
property :filter, as: 'filter', class: Google::Apis::DatastoreV1beta3::Filter, decorator: Google::Apis::DatastoreV1beta3::Filter::Representation
|
||||
|
||||
collection :kind, as: 'kind', class: Google::Apis::DatastoreV1beta3::KindExpression, decorator: Google::Apis::DatastoreV1beta3::KindExpression::Representation
|
||||
|
||||
property :limit, as: 'limit'
|
||||
property :offset, as: 'offset'
|
||||
collection :order, as: 'order', class: Google::Apis::DatastoreV1beta3::PropertyOrder, decorator: Google::Apis::DatastoreV1beta3::PropertyOrder::Representation
|
||||
|
||||
collection :projection, as: 'projection', class: Google::Apis::DatastoreV1beta3::Projection, decorator: Google::Apis::DatastoreV1beta3::Projection::Representation
|
||||
|
||||
property :start_cursor, :base64 => true, as: 'startCursor'
|
||||
end
|
||||
end
|
||||
|
||||
class QueryResultBatch
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_cursor, :base64 => true, as: 'endCursor'
|
||||
property :entity_result_type, as: 'entityResultType'
|
||||
collection :entity_results, as: 'entityResults', class: Google::Apis::DatastoreV1beta3::EntityResult, decorator: Google::Apis::DatastoreV1beta3::EntityResult::Representation
|
||||
|
||||
property :more_results, as: 'moreResults'
|
||||
property :skipped_cursor, :base64 => true, as: 'skippedCursor'
|
||||
property :skipped_results, as: 'skippedResults'
|
||||
property :snapshot_version, :numeric_string => true, as: 'snapshotVersion'
|
||||
end
|
||||
end
|
||||
|
||||
class ReadOnly
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
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 ReadWrite
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :previous_transaction, :base64 => true, as: 'previousTransaction'
|
||||
end
|
||||
end
|
||||
|
||||
class RollbackRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :transaction, :base64 => true, as: 'transaction'
|
||||
end
|
||||
end
|
||||
|
||||
class RollbackResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class RunQueryRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :gql_query, as: 'gqlQuery', class: Google::Apis::DatastoreV1beta3::GqlQuery, decorator: Google::Apis::DatastoreV1beta3::GqlQuery::Representation
|
||||
|
||||
property :partition_id, as: 'partitionId', class: Google::Apis::DatastoreV1beta3::PartitionId, decorator: Google::Apis::DatastoreV1beta3::PartitionId::Representation
|
||||
|
||||
property :query, as: 'query', class: Google::Apis::DatastoreV1beta3::Query, decorator: Google::Apis::DatastoreV1beta3::Query::Representation
|
||||
|
||||
property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1beta3::ReadOptions, decorator: Google::Apis::DatastoreV1beta3::ReadOptions::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class RunQueryResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :batch, as: 'batch', class: Google::Apis::DatastoreV1beta3::QueryResultBatch, decorator: Google::Apis::DatastoreV1beta3::QueryResultBatch::Representation
|
||||
|
||||
property :query, as: 'query', class: Google::Apis::DatastoreV1beta3::Query, decorator: Google::Apis::DatastoreV1beta3::Query::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class TransactionOptions
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :read_only, as: 'readOnly', class: Google::Apis::DatastoreV1beta3::ReadOnly, decorator: Google::Apis::DatastoreV1beta3::ReadOnly::Representation
|
||||
|
||||
property :read_write, as: 'readWrite', class: Google::Apis::DatastoreV1beta3::ReadWrite, decorator: Google::Apis::DatastoreV1beta3::ReadWrite::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Value
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :array_value, as: 'arrayValue', class: Google::Apis::DatastoreV1beta3::ArrayValue, decorator: Google::Apis::DatastoreV1beta3::ArrayValue::Representation
|
||||
|
||||
property :blob_value, :base64 => true, as: 'blobValue'
|
||||
property :boolean_value, as: 'booleanValue'
|
||||
property :double_value, as: 'doubleValue'
|
||||
property :entity_value, as: 'entityValue', class: Google::Apis::DatastoreV1beta3::Entity, decorator: Google::Apis::DatastoreV1beta3::Entity::Representation
|
||||
|
||||
property :exclude_from_indexes, as: 'excludeFromIndexes'
|
||||
property :geo_point_value, as: 'geoPointValue', class: Google::Apis::DatastoreV1beta3::LatLng, decorator: Google::Apis::DatastoreV1beta3::LatLng::Representation
|
||||
|
||||
property :integer_value, :numeric_string => true, as: 'integerValue'
|
||||
property :key_value, as: 'keyValue', class: Google::Apis::DatastoreV1beta3::Key, decorator: Google::Apis::DatastoreV1beta3::Key::Representation
|
||||
|
||||
property :meaning, as: 'meaning'
|
||||
property :null_value, as: 'nullValue'
|
||||
property :string_value, as: 'stringValue'
|
||||
property :timestamp_value, as: 'timestampValue'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,260 @@
|
|||
# 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 DatastoreV1beta3
|
||||
# Google Cloud Datastore API
|
||||
#
|
||||
# Accesses the schemaless NoSQL database to provide fully managed, robust,
|
||||
# scalable storage for your application.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/datastore_v1beta3'
|
||||
#
|
||||
# Datastore = Google::Apis::DatastoreV1beta3 # Alias the module
|
||||
# service = Datastore::DatastoreService.new
|
||||
#
|
||||
# @see https://cloud.google.com/datastore/
|
||||
class DatastoreService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://datastore.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
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::DatastoreV1beta3::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::DatastoreV1beta3::AllocateIdsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DatastoreV1beta3::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, 'v1beta3/projects/{projectId}:allocateIds', options)
|
||||
command.request_representation = Google::Apis::DatastoreV1beta3::AllocateIdsRequest::Representation
|
||||
command.request_object = allocate_ids_request_object
|
||||
command.response_representation = Google::Apis::DatastoreV1beta3::AllocateIdsResponse::Representation
|
||||
command.response_class = Google::Apis::DatastoreV1beta3::AllocateIdsResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Begins a new transaction.
|
||||
# @param [String] project_id
|
||||
# The ID of the project against which to make the request.
|
||||
# @param [Google::Apis::DatastoreV1beta3::BeginTransactionRequest] begin_transaction_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DatastoreV1beta3::BeginTransactionResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DatastoreV1beta3::BeginTransactionResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta3/projects/{projectId}:beginTransaction', options)
|
||||
command.request_representation = Google::Apis::DatastoreV1beta3::BeginTransactionRequest::Representation
|
||||
command.request_object = begin_transaction_request_object
|
||||
command.response_representation = Google::Apis::DatastoreV1beta3::BeginTransactionResponse::Representation
|
||||
command.response_class = Google::Apis::DatastoreV1beta3::BeginTransactionResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Commits a transaction, optionally creating, deleting or modifying some
|
||||
# entities.
|
||||
# @param [String] project_id
|
||||
# The ID of the project against which to make the request.
|
||||
# @param [Google::Apis::DatastoreV1beta3::CommitRequest] commit_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DatastoreV1beta3::CommitResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DatastoreV1beta3::CommitResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta3/projects/{projectId}:commit', options)
|
||||
command.request_representation = Google::Apis::DatastoreV1beta3::CommitRequest::Representation
|
||||
command.request_object = commit_request_object
|
||||
command.response_representation = Google::Apis::DatastoreV1beta3::CommitResponse::Representation
|
||||
command.response_class = Google::Apis::DatastoreV1beta3::CommitResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Looks up entities by key.
|
||||
# @param [String] project_id
|
||||
# The ID of the project against which to make the request.
|
||||
# @param [Google::Apis::DatastoreV1beta3::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::DatastoreV1beta3::LookupResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DatastoreV1beta3::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, 'v1beta3/projects/{projectId}:lookup', options)
|
||||
command.request_representation = Google::Apis::DatastoreV1beta3::LookupRequest::Representation
|
||||
command.request_object = lookup_request_object
|
||||
command.response_representation = Google::Apis::DatastoreV1beta3::LookupResponse::Representation
|
||||
command.response_class = Google::Apis::DatastoreV1beta3::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
|
||||
|
||||
# Rolls back a transaction.
|
||||
# @param [String] project_id
|
||||
# The ID of the project against which to make the request.
|
||||
# @param [Google::Apis::DatastoreV1beta3::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::DatastoreV1beta3::RollbackResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DatastoreV1beta3::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, 'v1beta3/projects/{projectId}:rollback', options)
|
||||
command.request_representation = Google::Apis::DatastoreV1beta3::RollbackRequest::Representation
|
||||
command.request_object = rollback_request_object
|
||||
command.response_representation = Google::Apis::DatastoreV1beta3::RollbackResponse::Representation
|
||||
command.response_class = Google::Apis::DatastoreV1beta3::RollbackResponse
|
||||
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
|
||||
|
||||
# Queries for entities.
|
||||
# @param [String] project_id
|
||||
# The ID of the project against which to make the request.
|
||||
# @param [Google::Apis::DatastoreV1beta3::RunQueryRequest] run_query_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::DatastoreV1beta3::RunQueryResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::DatastoreV1beta3::RunQueryResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1beta3/projects/{projectId}:runQuery', options)
|
||||
command.request_representation = Google::Apis::DatastoreV1beta3::RunQueryRequest::Representation
|
||||
command.request_object = run_query_request_object
|
||||
command.response_representation = Google::Apis::DatastoreV1beta3::RunQueryResponse::Representation
|
||||
command.response_class = Google::Apis::DatastoreV1beta3::RunQueryResponse
|
||||
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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,44 @@
|
|||
# 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/deploymentmanager_alpha/service.rb'
|
||||
require 'google/apis/deploymentmanager_alpha/classes.rb'
|
||||
require 'google/apis/deploymentmanager_alpha/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Google Cloud Deployment Manager Alpha API
|
||||
#
|
||||
# The Deployment Manager API allows users to declaratively configure, deploy and
|
||||
# run complex solutions on the Google Cloud Platform.
|
||||
#
|
||||
# @see https://cloud.google.com/deployment-manager/
|
||||
module DeploymentmanagerAlpha
|
||||
VERSION = 'Alpha'
|
||||
REVISION = '20170810'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
||||
# View your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
||||
|
||||
# View and manage your Google Cloud Platform management resources and deployment status information
|
||||
AUTH_NDEV_CLOUDMAN = 'https://www.googleapis.com/auth/ndev.cloudman'
|
||||
|
||||
# View your Google Cloud Platform management resources and deployment status information
|
||||
AUTH_NDEV_CLOUDMAN_READONLY = 'https://www.googleapis.com/auth/ndev.cloudman.readonly'
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue