Temporarily remove generated code, submitting as separete pull request

This commit is contained in:
Steven Bazyl 2015-06-23 15:19:42 -07:00
parent f584a2cec8
commit 567f8bef68
284 changed files with 0 additions and 223459 deletions

View File

@ -1,35 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/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 = '20150520'
# 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

View File

@ -1,375 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangebuyerV1_3
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
class BidderLocation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AccountsList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class BillingInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class BillingInfoList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Budget
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Creative
class Representation < Google::Apis::Core::JsonRepresentation; end
class Correction
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DisapprovalReason
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FilteringReasons
class Representation < Google::Apis::Core::JsonRepresentation; end
class Reason
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
end
class CreativesList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DirectDeal
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DirectDealsList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PerformanceReport
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PerformanceReportList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PretargetingConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
class Dimension
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExcludedPlacement
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Placement
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class PretargetingConfigList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Account
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
# @private
class BidderLocation
class Representation < Google::Apis::Core::JsonRepresentation
property :maximum_qps, as: 'maximumQps'
property :region, as: 'region'
property :url, as: 'url'
end
end
end
# @private
class AccountsList
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
# @private
class BillingInfo
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
# @private
class BillingInfoList
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
# @private
class Budget
class Representation < Google::Apis::Core::JsonRepresentation
property :account_id, as: 'accountId'
property :billing_id, as: 'billingId'
property :budget_amount, as: 'budgetAmount'
property :currency_code, as: 'currencyCode'
property :id, as: 'id'
property :kind, as: 'kind'
end
end
# @private
class Creative
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, as: 'agencyId'
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'
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 :video_url, as: 'videoURL'
property :width, as: 'width'
end
# @private
class Correction
class Representation < Google::Apis::Core::JsonRepresentation
collection :details, as: 'details'
property :reason, as: 'reason'
end
end
# @private
class DisapprovalReason
class Representation < Google::Apis::Core::JsonRepresentation
collection :details, as: 'details'
property :reason, as: 'reason'
end
end
# @private
class FilteringReasons
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
# @private
class Reason
class Representation < Google::Apis::Core::JsonRepresentation
property :filtering_count, as: 'filteringCount'
property :filtering_status, as: 'filteringStatus'
end
end
end
end
# @private
class CreativesList
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
# @private
class DirectDeal
class Representation < Google::Apis::Core::JsonRepresentation
property :account_id, as: 'accountId'
property :advertiser, as: 'advertiser'
property :currency_code, as: 'currencyCode'
property :end_time, as: 'endTime'
property :fixed_cpm, as: 'fixedCpm'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :private_exchange_min_cpm, as: 'privateExchangeMinCpm'
property :publisher_blocks_overriden, as: 'publisherBlocksOverriden'
property :seller_network, as: 'sellerNetwork'
property :start_time, as: 'startTime'
end
end
# @private
class DirectDealsList
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
# @private
class PerformanceReport
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, as: 'timestamp'
property :unsuccessful_request_rate, as: 'unsuccessfulRequestRate'
end
end
# @private
class PerformanceReportList
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
# @private
class PretargetingConfig
class Representation < Google::Apis::Core::JsonRepresentation
property :billing_id, as: 'billingId'
property :config_id, 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
# @private
class Dimension
class Representation < Google::Apis::Core::JsonRepresentation
property :height, as: 'height'
property :width, as: 'width'
end
end
# @private
class ExcludedPlacement
class Representation < Google::Apis::Core::JsonRepresentation
property :token, as: 'token'
property :type, as: 'type'
end
end
# @private
class Placement
class Representation < Google::Apis::Core::JsonRepresentation
property :token, as: 'token'
property :type, as: 'type'
end
end
end
# @private
class PretargetingConfigList
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

View File

@ -1,893 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module 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/')
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)
path = 'accounts/{id}'
command = make_simple_command(:get, path, 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)
path = 'accounts'
command = make_simple_command(:get, path, 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)
path = 'accounts/{id}'
command = make_simple_command(:patch, path, 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)
path = 'accounts/{id}'
command = make_simple_command(:put, path, 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)
path = 'billinginfo/{accountId}'
command = make_simple_command(:get, path, 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)
path = 'billinginfo'
command = make_simple_command(:get, path, 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 [String] account_id
# The account id to get the budget information for.
# @param [String] 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)
path = 'billinginfo/{accountId}/{billingId}'
command = make_simple_command(:get, path, 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 [String] account_id
# The account id associated with the budget being updated.
# @param [String] 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)
path = 'billinginfo/{accountId}/{billingId}'
command = make_simple_command(:patch, path, 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 [String] account_id
# The account id associated with the budget being updated.
# @param [String] 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)
path = 'billinginfo/{accountId}/{billingId}'
command = make_simple_command(:put, path, 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)
path = 'creatives/{accountId}/{buyerCreativeId}'
command = make_simple_command(:get, path, 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)
path = 'creatives'
command = make_simple_command(:post, path, 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)
path = 'creatives'
command = make_simple_command(:get, path, 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 [String] 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)
path = 'directdeals/{id}'
command = make_simple_command(:get, path, 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)
path = 'directdeals'
command = make_simple_command(:get, path, 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 [String] 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 [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] start_date_time
# The start time of the report in ISO 8601 timestamp format using UTC.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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: nil, end_date_time: nil, max_results: nil, page_token: nil, start_date_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'performancereport'
command = make_simple_command(:get, path, 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 [String] account_id
# The account id to delete the pretargeting config for.
# @param [String] 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)
path = 'pretargetingconfigs/{accountId}/{configId}'
command = make_simple_command(:delete, path, 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 [String] account_id
# The account id to get the pretargeting config for.
# @param [String] 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)
path = 'pretargetingconfigs/{accountId}/{configId}'
command = make_simple_command(:get, path, 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 [String] 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)
path = 'pretargetingconfigs/{accountId}'
command = make_simple_command(:post, path, 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 [String] 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)
path = 'pretargetingconfigs/{accountId}'
command = make_simple_command(:get, path, 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 [String] account_id
# The account id to update the pretargeting config for.
# @param [String] 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)
path = 'pretargetingconfigs/{accountId}/{configId}'
command = make_simple_command(:patch, path, 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 [String] account_id
# The account id to update the pretargeting config for.
# @param [String] 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)
path = 'pretargetingconfigs/{accountId}/{configId}'
command = make_simple_command(:put, path, 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

View File

@ -1,38 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/adexchangeseller_v2_0/service.rb'
require 'google/apis/adexchangeseller_v2_0/classes.rb'
require 'google/apis/adexchangeseller_v2_0/representations.rb'
module Google
module Apis
# Ad Exchange Seller API
#
# Gives Ad Exchange seller users access to their inventory and the ability to
# generate reports
#
# @see https://developers.google.com/ad-exchange/seller-rest/
module AdexchangesellerV2_0
VERSION = 'V2_0'
REVISION = '20150420'
# 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

View File

@ -1,792 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangesellerV2_0
#
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] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
end
end
#
class Accounts
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The accounts returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::Account>]
attr_accessor :items
# Kind of list this is, in this case adexchangeseller#accounts.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Continuation token used to page through accounts. 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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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] unless args[:arc_opt_in].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@product_code = args[:product_code] unless args[:product_code].nil?
@supports_reporting = args[:supports_reporting] unless args[:supports_reporting].nil?
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::AdexchangesellerV2_0::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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@message = args[:message] unless args[:message].nil?
@severity = args[:severity] unless args[:severity].nil?
@type = args[:type] unless args[:type].nil?
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::AdexchangesellerV2_0::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] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
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::AdexchangesellerV2_0::CustomChannel::TargetingInfo]
attr_accessor :targeting_info
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@targeting_info = args[:targeting_info] unless args[:targeting_info].nil?
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] unless args[:ads_appear_on].nil?
@description = args[:description] unless args[:description].nil?
@location = args[:location] unless args[:location].nil?
@site_language = args[:site_language] unless args[:site_language].nil?
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::AdexchangesellerV2_0::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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class Metadata
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdexchangesellerV2_0::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] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
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 [String]
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 [String]
attr_accessor :fixed_cpm
# Unique identifier of this preferred deal.
# Corresponds to the JSON property `id`
# @return [String]
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 [String]
attr_accessor :start_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@advertiser_name = args[:advertiser_name] unless args[:advertiser_name].nil?
@buyer_network_name = args[:buyer_network_name] unless args[:buyer_network_name].nil?
@currency_code = args[:currency_code] unless args[:currency_code].nil?
@end_time = args[:end_time] unless args[:end_time].nil?
@fixed_cpm = args[:fixed_cpm] unless args[:fixed_cpm].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@start_time = args[:start_time] unless args[:start_time].nil?
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::AdexchangesellerV2_0::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] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
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::AdexchangesellerV2_0::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 [String]
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] unless args[:averages].nil?
@headers = args[:headers] unless args[:headers].nil?
@kind = args[:kind] unless args[:kind].nil?
@rows = args[:rows] unless args[:rows].nil?
@total_matched_rows = args[:total_matched_rows] unless args[:total_matched_rows].nil?
@totals = args[:totals] unless args[:totals].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
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] unless args[:currency].nil?
@name = args[:name] unless args[:name].nil?
@type = args[:type] unless args[:type].nil?
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] unless args[:compatible_dimensions].nil?
@compatible_metrics = args[:compatible_metrics] unless args[:compatible_metrics].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@required_dimensions = args[:required_dimensions] unless args[:required_dimensions].nil?
@required_metrics = args[:required_metrics] unless args[:required_metrics].nil?
@supported_products = args[:supported_products] unless args[:supported_products].nil?
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] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
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::AdexchangesellerV2_0::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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@url_pattern = args[:url_pattern] unless args[:url_pattern].nil?
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::AdexchangesellerV2_0::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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
end
end
end

View File

@ -1,309 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangesellerV2_0
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Alert
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Alerts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
class TargetingInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Metadata
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PreferredDeal
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PreferredDeals
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Report
class Representation < Google::Apis::Core::JsonRepresentation; end
class Header
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ReportingMetadataEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedReport
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedReports
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Account
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::Account, decorator: Google::Apis::AdexchangesellerV2_0::Account::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AdClient
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
# @private
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::AdClient, decorator: Google::Apis::AdexchangesellerV2_0::AdClient::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Alert
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
# @private
class Alerts
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::Alert, decorator: Google::Apis::AdexchangesellerV2_0::Alert::Representation
property :kind, as: 'kind'
end
end
# @private
class CustomChannel
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::AdexchangesellerV2_0::CustomChannel::TargetingInfo, decorator: Google::Apis::AdexchangesellerV2_0::CustomChannel::TargetingInfo::Representation
end
# @private
class TargetingInfo
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
# @private
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::CustomChannel, decorator: Google::Apis::AdexchangesellerV2_0::CustomChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Metadata
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::ReportingMetadataEntry, decorator: Google::Apis::AdexchangesellerV2_0::ReportingMetadataEntry::Representation
property :kind, as: 'kind'
end
end
# @private
class PreferredDeal
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, as: 'endTime'
property :fixed_cpm, as: 'fixedCpm'
property :id, as: 'id'
property :kind, as: 'kind'
property :start_time, as: 'startTime'
end
end
# @private
class PreferredDeals
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::PreferredDeal, decorator: Google::Apis::AdexchangesellerV2_0::PreferredDeal::Representation
property :kind, as: 'kind'
end
end
# @private
class Report
class Representation < Google::Apis::Core::JsonRepresentation
collection :averages, as: 'averages'
collection :headers, as: 'headers', class: Google::Apis::AdexchangesellerV2_0::Report::Header, decorator: Google::Apis::AdexchangesellerV2_0::Report::Header::Representation
property :kind, as: 'kind'
collection :rows, as: 'rows', :class => Array do
include Representable::JSON::Collection
items
end
property :total_matched_rows, as: 'totalMatchedRows'
collection :totals, as: 'totals'
collection :warnings, as: 'warnings'
end
# @private
class Header
class Representation < Google::Apis::Core::JsonRepresentation
property :currency, as: 'currency'
property :name, as: 'name'
property :type, as: 'type'
end
end
end
# @private
class ReportingMetadataEntry
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
# @private
class SavedReport
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class SavedReports
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::SavedReport, decorator: Google::Apis::AdexchangesellerV2_0::SavedReport::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :url_pattern, as: 'urlPattern'
end
end
# @private
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdexchangesellerV2_0::UrlChannel, decorator: Google::Apis::AdexchangesellerV2_0::UrlChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
end
end
end

View File

@ -1,682 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdexchangesellerV2_0
# Ad Exchange Seller API
#
# Gives Ad Exchange seller users access to their inventory and the ability to
# generate reports
#
# @example
# require 'google/apis/adexchangeseller_v2_0'
#
# Adexchangeseller = Google::Apis::AdexchangesellerV2_0 # 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/v2.0/')
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::AdexchangesellerV2_0::Account] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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)
path = 'accounts/{accountId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Account::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::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 accounts available to this Ad Exchange account.
# @param [Fixnum] max_results
# The maximum number of accounts to include in the response, used for paging.
# @param [String] page_token
# A continuation token, used to page through accounts. 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::AdexchangesellerV2_0::Accounts] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::Accounts]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Accounts::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Accounts
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 clients in this Ad Exchange account.
# @param [String] account_id
# Account to which the ad client belongs.
# @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::AdexchangesellerV2_0::AdClients] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_ad_clients(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/adclients'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::AdClients::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::AdClients
command.params['accountId'] = account_id unless account_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] account_id
# Account owning the alerts.
# @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::AdexchangesellerV2_0::Alerts] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_alerts(account_id, locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/alerts'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Alerts::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Alerts
command.params['accountId'] = account_id unless account_id.nil?
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] account_id
# Account to which the ad client belongs.
# @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::AdexchangesellerV2_0::CustomChannel] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_custom_channel(account_id, ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::CustomChannel::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::CustomChannel
command.params['accountId'] = account_id unless account_id.nil?
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] account_id
# Account to which the ad client belongs.
# @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::AdexchangesellerV2_0::CustomChannels] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_custom_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/adclients/{adClientId}/customchannels'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::CustomChannels::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::CustomChannels
command.params['accountId'] = account_id unless account_id.nil?
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 the metadata for the dimensions available to this AdExchange account.
# @param [String] account_id
# Account with visibility to the dimensions.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AdexchangesellerV2_0::Metadata] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_metadata_dimensions(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/metadata/dimensions'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Metadata::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Metadata
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 the metadata for the metrics available to this AdExchange account.
# @param [String] account_id
# Account with visibility to the metrics.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AdexchangesellerV2_0::Metadata] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_metadata_metrics(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/metadata/metrics'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Metadata::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Metadata
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
# Get information about the selected Ad Exchange Preferred Deal.
# @param [String] account_id
# Account owning the 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::AdexchangesellerV2_0::PreferredDeal] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_preferred_deal(account_id, deal_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/preferreddeals/{dealId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::PreferredDeal::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::PreferredDeal
command.params['accountId'] = account_id unless account_id.nil?
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] account_id
# Account owning the 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::AdexchangesellerV2_0::PreferredDeals] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_preferred_deals(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/preferreddeals'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::PreferredDeals::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::PreferredDeals
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
# 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] account_id
# Account which owns the generated report.
# @param [Array<String>, String] dimension
# Dimensions to base the report on.
# @param [String] end_date
# End of the date range to report on in "YYYY-MM-DD" format, inclusive.
# @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 [String] start_date
# Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
# @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::AdexchangesellerV2_0::Report] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_report(account_id, dimension: nil, end_date: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
path = 'accounts/{accountId}/reports'
if download_dest.nil?
command = make_simple_command(:get, path, options)
else
command = make_download_command(:get, path, options)
command.download_dest = download_dest
end
command.response_representation = Google::Apis::AdexchangesellerV2_0::Report::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Report
command.params['accountId'] = account_id unless account_id.nil?
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] account_id
# Account owning the saved report.
# @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::AdexchangesellerV2_0::Report] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_saved_report(account_id, saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/reports/{savedReportId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::Report::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::Report
command.params['accountId'] = account_id unless account_id.nil?
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 [String] account_id
# Account owning the saved reports.
# @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::AdexchangesellerV2_0::SavedReports] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_saved_reports(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/reports/saved'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::SavedReports::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::SavedReports
command.params['accountId'] = account_id unless account_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 URL channels in the specified ad client for this Ad Exchange account.
# @param [String] account_id
# Account to which the ad client belongs.
# @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::AdexchangesellerV2_0::UrlChannels] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdexchangesellerV2_0::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_account_url_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'accounts/{accountId}/adclients/{adClientId}/urlchannels'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdexchangesellerV2_0::UrlChannels::Representation
command.response_class = Google::Apis::AdexchangesellerV2_0::UrlChannels
command.params['accountId'] = account_id unless account_id.nil?
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

View File

@ -1,89 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/admin_directory_v1/service.rb'
require 'google/apis/admin_directory_v1/classes.rb'
require 'google/apis/admin_directory_v1/representations.rb'
module Google
module Apis
# Admin Directory API
#
# The Admin SDK Directory API lets you view and manage enterprise resources such
# as users and groups, administrative notifications, security features, and more.
#
# @see https://developers.google.com/admin-sdk/directory/
module AdminDirectoryV1
VERSION = 'DirectoryV1'
REVISION = '20150326'
# View and manage your Chrome OS devices' metadata
AUTH_ADMIN_DIRECTORY_DEVICE_CHROMEOS = 'https://www.googleapis.com/auth/admin.directory.device.chromeos'
# View your Chrome OS devices' metadata
AUTH_ADMIN_DIRECTORY_DEVICE_CHROMEOS_READONLY = 'https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly'
# View and manage your mobile devices' metadata
AUTH_ADMIN_DIRECTORY_DEVICE_MOBILE = 'https://www.googleapis.com/auth/admin.directory.device.mobile'
# Manage your mobile devices by performing administrative tasks
AUTH_ADMIN_DIRECTORY_DEVICE_MOBILE_ACTION = 'https://www.googleapis.com/auth/admin.directory.device.mobile.action'
# View your mobile devices' metadata
AUTH_ADMIN_DIRECTORY_DEVICE_MOBILE_READONLY = 'https://www.googleapis.com/auth/admin.directory.device.mobile.readonly'
# View and manage the provisioning of groups on your domain
AUTH_ADMIN_DIRECTORY_GROUP = 'https://www.googleapis.com/auth/admin.directory.group'
# View and manage group subscriptions on your domain
AUTH_ADMIN_DIRECTORY_GROUP_MEMBER = 'https://www.googleapis.com/auth/admin.directory.group.member'
# View group subscriptions on your domain
AUTH_ADMIN_DIRECTORY_GROUP_MEMBER_READONLY = 'https://www.googleapis.com/auth/admin.directory.group.member.readonly'
# View groups on your domain
AUTH_ADMIN_DIRECTORY_GROUP_READONLY = 'https://www.googleapis.com/auth/admin.directory.group.readonly'
# View and manage notifications received on your domain
AUTH_ADMIN_DIRECTORY_NOTIFICATIONS = 'https://www.googleapis.com/auth/admin.directory.notifications'
# View and manage organization units on your domain
AUTH_ADMIN_DIRECTORY_ORGUNIT = 'https://www.googleapis.com/auth/admin.directory.orgunit'
# View organization units on your domain
AUTH_ADMIN_DIRECTORY_ORGUNIT_READONLY = 'https://www.googleapis.com/auth/admin.directory.orgunit.readonly'
# View and manage the provisioning of users on your domain
AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user'
# View and manage user aliases on your domain
AUTH_ADMIN_DIRECTORY_USER_ALIAS = 'https://www.googleapis.com/auth/admin.directory.user.alias'
# View user aliases on your domain
AUTH_ADMIN_DIRECTORY_USER_ALIAS_READONLY = 'https://www.googleapis.com/auth/admin.directory.user.alias.readonly'
# View users on your domain
AUTH_ADMIN_DIRECTORY_USER_READONLY = 'https://www.googleapis.com/auth/admin.directory.user.readonly'
# Manage data access permissions for users on your domain
AUTH_ADMIN_DIRECTORY_USER_SECURITY = 'https://www.googleapis.com/auth/admin.directory.user.security'
# View and manage the provisioning of user schemas on your domain
AUTH_ADMIN_DIRECTORY_USERSCHEMA = 'https://www.googleapis.com/auth/admin.directory.userschema'
# View user schemas on your domain
AUTH_ADMIN_DIRECTORY_USERSCHEMA_READONLY = 'https://www.googleapis.com/auth/admin.directory.userschema.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,780 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdminDirectoryV1
class Alias
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Aliases
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Asp
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Asps
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Channel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ChromeOsDevice
class Representation < Google::Apis::Core::JsonRepresentation; end
class ActiveTimeRange
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class RecentUser
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ChromeOsDevices
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Group
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Groups
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Member
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Members
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MobileDevice
class Representation < Google::Apis::Core::JsonRepresentation; end
class Application
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class MobileDeviceAction
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MobileDevices
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Notification
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Notifications
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class OrgUnit
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class OrgUnits
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Schema
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SchemaFieldSpec
class Representation < Google::Apis::Core::JsonRepresentation; end
class NumericIndexingSpec
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Schemas
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Token
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Tokens
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class User
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserAbout
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserAddress
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserEmail
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserExternalId
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserIm
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserMakeAdmin
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserName
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserOrganization
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserPhone
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserPhoto
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserRelation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserUndelete
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserWebsite
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Users
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class VerificationCode
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class VerificationCodes
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Alias
class Representation < Google::Apis::Core::JsonRepresentation
property :alias, as: 'alias'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :primary_email, as: 'primaryEmail'
end
end
# @private
class Aliases
class Representation < Google::Apis::Core::JsonRepresentation
collection :aliases, as: 'aliases', class: Google::Apis::AdminDirectoryV1::Alias, decorator: Google::Apis::AdminDirectoryV1::Alias::Representation
property :etag, as: 'etag'
property :kind, as: 'kind'
end
end
# @private
class Asp
class Representation < Google::Apis::Core::JsonRepresentation
property :code_id, as: 'codeId'
property :creation_time, as: 'creationTime'
property :etag, as: 'etag'
property :kind, as: 'kind'
property :last_time_used, as: 'lastTimeUsed'
property :name, as: 'name'
property :user_key, as: 'userKey'
end
end
# @private
class Asps
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminDirectoryV1::Asp, decorator: Google::Apis::AdminDirectoryV1::Asp::Representation
property :kind, as: 'kind'
end
end
# @private
class Channel
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address'
property :expiration, as: 'expiration'
property :id, as: 'id'
property :kind, as: 'kind'
hash :params, as: 'params'
property :payload, as: 'payload'
property :resource_id, as: 'resourceId'
property :resource_uri, as: 'resourceUri'
property :token, as: 'token'
property :type, as: 'type'
end
end
# @private
class ChromeOsDevice
class Representation < Google::Apis::Core::JsonRepresentation
collection :active_time_ranges, as: 'activeTimeRanges', class: Google::Apis::AdminDirectoryV1::ChromeOsDevice::ActiveTimeRange, decorator: Google::Apis::AdminDirectoryV1::ChromeOsDevice::ActiveTimeRange::Representation
property :annotated_asset_id, as: 'annotatedAssetId'
property :annotated_location, as: 'annotatedLocation'
property :annotated_user, as: 'annotatedUser'
property :boot_mode, as: 'bootMode'
property :device_id, as: 'deviceId'
property :etag, as: 'etag'
property :ethernet_mac_address, as: 'ethernetMacAddress'
property :firmware_version, as: 'firmwareVersion'
property :kind, as: 'kind'
property :last_enrollment_time, as: 'lastEnrollmentTime', type: DateTime
property :last_sync, as: 'lastSync', type: DateTime
property :mac_address, as: 'macAddress'
property :meid, as: 'meid'
property :model, as: 'model'
property :notes, as: 'notes'
property :order_number, as: 'orderNumber'
property :org_unit_path, as: 'orgUnitPath'
property :os_version, as: 'osVersion'
property :platform_version, as: 'platformVersion'
collection :recent_users, as: 'recentUsers', class: Google::Apis::AdminDirectoryV1::ChromeOsDevice::RecentUser, decorator: Google::Apis::AdminDirectoryV1::ChromeOsDevice::RecentUser::Representation
property :serial_number, as: 'serialNumber'
property :status, as: 'status'
property :support_end_date, as: 'supportEndDate', type: DateTime
property :will_auto_renew, as: 'willAutoRenew'
end
# @private
class ActiveTimeRange
class Representation < Google::Apis::Core::JsonRepresentation
property :active_time, as: 'activeTime'
property :date, as: 'date', type: Date
end
end
# @private
class RecentUser
class Representation < Google::Apis::Core::JsonRepresentation
property :email, as: 'email'
property :type, as: 'type'
end
end
end
# @private
class ChromeOsDevices
class Representation < Google::Apis::Core::JsonRepresentation
collection :chromeosdevices, as: 'chromeosdevices', class: Google::Apis::AdminDirectoryV1::ChromeOsDevice, decorator: Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Group
class Representation < Google::Apis::Core::JsonRepresentation
property :admin_created, as: 'adminCreated'
collection :aliases, as: 'aliases'
property :description, as: 'description'
property :direct_members_count, as: 'directMembersCount'
property :email, as: 'email'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
collection :non_editable_aliases, as: 'nonEditableAliases'
end
end
# @private
class Groups
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :groups, as: 'groups', class: Google::Apis::AdminDirectoryV1::Group, decorator: Google::Apis::AdminDirectoryV1::Group::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Member
class Representation < Google::Apis::Core::JsonRepresentation
property :email, as: 'email'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :role, as: 'role'
property :type, as: 'type'
end
end
# @private
class Members
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :members, as: 'members', class: Google::Apis::AdminDirectoryV1::Member, decorator: Google::Apis::AdminDirectoryV1::Member::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class MobileDevice
class Representation < Google::Apis::Core::JsonRepresentation
collection :applications, as: 'applications', class: Google::Apis::AdminDirectoryV1::MobileDevice::Application, decorator: Google::Apis::AdminDirectoryV1::MobileDevice::Application::Representation
property :baseband_version, as: 'basebandVersion'
property :build_number, as: 'buildNumber'
property :default_language, as: 'defaultLanguage'
property :device_compromised_status, as: 'deviceCompromisedStatus'
property :device_id, as: 'deviceId'
collection :email, as: 'email'
property :etag, as: 'etag'
property :first_sync, as: 'firstSync', type: DateTime
property :hardware_id, as: 'hardwareId'
property :imei, as: 'imei'
property :kernel_version, as: 'kernelVersion'
property :kind, as: 'kind'
property :last_sync, as: 'lastSync', type: DateTime
property :managed_account_is_on_owner_profile, as: 'managedAccountIsOnOwnerProfile'
property :meid, as: 'meid'
property :model, as: 'model'
collection :name, as: 'name'
property :network_operator, as: 'networkOperator'
property :os, as: 'os'
property :resource_id, as: 'resourceId'
property :serial_number, as: 'serialNumber'
property :status, as: 'status'
property :type, as: 'type'
property :user_agent, as: 'userAgent'
property :wifi_mac_address, as: 'wifiMacAddress'
end
# @private
class Application
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :package_name, as: 'packageName'
collection :permission, as: 'permission'
property :version_code, as: 'versionCode'
property :version_name, as: 'versionName'
end
end
end
# @private
class MobileDeviceAction
class Representation < Google::Apis::Core::JsonRepresentation
property :action, as: 'action'
end
end
# @private
class MobileDevices
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :mobiledevices, as: 'mobiledevices', class: Google::Apis::AdminDirectoryV1::MobileDevice, decorator: Google::Apis::AdminDirectoryV1::MobileDevice::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Notification
class Representation < Google::Apis::Core::JsonRepresentation
property :body, as: 'body'
property :etag, as: 'etag'
property :from_address, as: 'fromAddress'
property :is_unread, as: 'isUnread'
property :kind, as: 'kind'
property :notification_id, as: 'notificationId'
property :send_time, as: 'sendTime', type: DateTime
property :subject, as: 'subject'
end
end
# @private
class Notifications
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminDirectoryV1::Notification, decorator: Google::Apis::AdminDirectoryV1::Notification::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :unread_notifications_count, as: 'unreadNotificationsCount'
end
end
# @private
class OrgUnit
class Representation < Google::Apis::Core::JsonRepresentation
property :block_inheritance, as: 'blockInheritance'
property :description, as: 'description'
property :etag, as: 'etag'
property :kind, as: 'kind'
property :name, as: 'name'
property :org_unit_id, as: 'orgUnitId'
property :org_unit_path, as: 'orgUnitPath'
property :parent_org_unit_id, as: 'parentOrgUnitId'
property :parent_org_unit_path, as: 'parentOrgUnitPath'
end
end
# @private
class OrgUnits
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :organization_units, as: 'organizationUnits', class: Google::Apis::AdminDirectoryV1::OrgUnit, decorator: Google::Apis::AdminDirectoryV1::OrgUnit::Representation
end
end
# @private
class Schema
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :fields, as: 'fields', class: Google::Apis::AdminDirectoryV1::SchemaFieldSpec, decorator: Google::Apis::AdminDirectoryV1::SchemaFieldSpec::Representation
property :kind, as: 'kind'
property :schema_id, as: 'schemaId'
property :schema_name, as: 'schemaName'
end
end
# @private
class SchemaFieldSpec
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :field_id, as: 'fieldId'
property :field_name, as: 'fieldName'
property :field_type, as: 'fieldType'
property :indexed, as: 'indexed'
property :kind, as: 'kind'
property :multi_valued, as: 'multiValued'
property :numeric_indexing_spec, as: 'numericIndexingSpec', class: Google::Apis::AdminDirectoryV1::SchemaFieldSpec::NumericIndexingSpec, decorator: Google::Apis::AdminDirectoryV1::SchemaFieldSpec::NumericIndexingSpec::Representation
property :read_access_type, as: 'readAccessType'
end
# @private
class NumericIndexingSpec
class Representation < Google::Apis::Core::JsonRepresentation
property :max_value, as: 'maxValue'
property :min_value, as: 'minValue'
end
end
end
# @private
class Schemas
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :schemas, as: 'schemas', class: Google::Apis::AdminDirectoryV1::Schema, decorator: Google::Apis::AdminDirectoryV1::Schema::Representation
end
end
# @private
class Token
class Representation < Google::Apis::Core::JsonRepresentation
property :anonymous, as: 'anonymous'
property :client_id, as: 'clientId'
property :display_text, as: 'displayText'
property :etag, as: 'etag'
property :kind, as: 'kind'
property :native_app, as: 'nativeApp'
collection :scopes, as: 'scopes'
property :user_key, as: 'userKey'
end
end
# @private
class Tokens
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminDirectoryV1::Token, decorator: Google::Apis::AdminDirectoryV1::Token::Representation
property :kind, as: 'kind'
end
end
# @private
class User
class Representation < Google::Apis::Core::JsonRepresentation
property :addresses, as: 'addresses'
property :agreed_to_terms, as: 'agreedToTerms'
collection :aliases, as: 'aliases'
property :change_password_at_next_login, as: 'changePasswordAtNextLogin'
property :creation_time, as: 'creationTime', type: DateTime
hash :custom_schemas, as: 'customSchemas'
property :customer_id, as: 'customerId'
property :deletion_time, as: 'deletionTime', type: DateTime
property :emails, as: 'emails'
property :etag, as: 'etag'
property :external_ids, as: 'externalIds'
property :hash_function, as: 'hashFunction'
property :id, as: 'id'
property :ims, as: 'ims'
property :include_in_global_address_list, as: 'includeInGlobalAddressList'
property :ip_whitelisted, as: 'ipWhitelisted'
property :is_admin, as: 'isAdmin'
property :is_delegated_admin, as: 'isDelegatedAdmin'
property :is_mailbox_setup, as: 'isMailboxSetup'
property :kind, as: 'kind'
property :last_login_time, as: 'lastLoginTime', type: DateTime
property :name, as: 'name', class: Google::Apis::AdminDirectoryV1::UserName, decorator: Google::Apis::AdminDirectoryV1::UserName::Representation
collection :non_editable_aliases, as: 'nonEditableAliases'
property :notes, as: 'notes'
property :org_unit_path, as: 'orgUnitPath'
property :organizations, as: 'organizations'
property :password, as: 'password'
property :phones, as: 'phones'
property :primary_email, as: 'primaryEmail'
property :relations, as: 'relations'
property :suspended, as: 'suspended'
property :suspension_reason, as: 'suspensionReason'
property :thumbnail_photo_etag, as: 'thumbnailPhotoEtag'
property :thumbnail_photo_url, as: 'thumbnailPhotoUrl'
property :websites, as: 'websites'
end
end
# @private
class UserAbout
class Representation < Google::Apis::Core::JsonRepresentation
property :content_type, as: 'contentType'
property :value, as: 'value'
end
end
# @private
class UserAddress
class Representation < Google::Apis::Core::JsonRepresentation
property :country, as: 'country'
property :country_code, as: 'countryCode'
property :custom_type, as: 'customType'
property :extended_address, as: 'extendedAddress'
property :formatted, as: 'formatted'
property :locality, as: 'locality'
property :po_box, as: 'poBox'
property :postal_code, as: 'postalCode'
property :primary, as: 'primary'
property :region, as: 'region'
property :source_is_structured, as: 'sourceIsStructured'
property :street_address, as: 'streetAddress'
property :type, as: 'type'
end
end
# @private
class UserEmail
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address'
property :custom_type, as: 'customType'
property :primary, as: 'primary'
property :type, as: 'type'
end
end
# @private
class UserExternalId
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_type, as: 'customType'
property :type, as: 'type'
property :value, as: 'value'
end
end
# @private
class UserIm
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_protocol, as: 'customProtocol'
property :custom_type, as: 'customType'
property :im, as: 'im'
property :primary, as: 'primary'
property :protocol, as: 'protocol'
property :type, as: 'type'
end
end
# @private
class UserMakeAdmin
class Representation < Google::Apis::Core::JsonRepresentation
property :status, as: 'status'
end
end
# @private
class UserName
class Representation < Google::Apis::Core::JsonRepresentation
property :family_name, as: 'familyName'
property :full_name, as: 'fullName'
property :given_name, as: 'givenName'
end
end
# @private
class UserOrganization
class Representation < Google::Apis::Core::JsonRepresentation
property :cost_center, as: 'costCenter'
property :custom_type, as: 'customType'
property :department, as: 'department'
property :description, as: 'description'
property :domain, as: 'domain'
property :location, as: 'location'
property :name, as: 'name'
property :primary, as: 'primary'
property :symbol, as: 'symbol'
property :title, as: 'title'
property :type, as: 'type'
end
end
# @private
class UserPhone
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_type, as: 'customType'
property :primary, as: 'primary'
property :type, as: 'type'
property :value, as: 'value'
end
end
# @private
class UserPhoto
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :height, as: 'height'
property :id, as: 'id'
property :kind, as: 'kind'
property :mime_type, as: 'mimeType'
property :photo_data, :base64 => true, as: 'photoData'
property :primary_email, as: 'primaryEmail'
property :width, as: 'width'
end
end
# @private
class UserRelation
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_type, as: 'customType'
property :type, as: 'type'
property :value, as: 'value'
end
end
# @private
class UserUndelete
class Representation < Google::Apis::Core::JsonRepresentation
property :org_unit_path, as: 'orgUnitPath'
end
end
# @private
class UserWebsite
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_type, as: 'customType'
property :primary, as: 'primary'
property :type, as: 'type'
property :value, as: 'value'
end
end
# @private
class Users
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :trigger_event, as: 'trigger_event'
collection :users, as: 'users', class: Google::Apis::AdminDirectoryV1::User, decorator: Google::Apis::AdminDirectoryV1::User::Representation
end
end
# @private
class VerificationCode
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :user_id, as: 'userId'
property :verification_code, as: 'verificationCode'
end
end
# @private
class VerificationCodes
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminDirectoryV1::VerificationCode, decorator: Google::Apis::AdminDirectoryV1::VerificationCode::Representation
property :kind, as: 'kind'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/admin_reports_v1/service.rb'
require 'google/apis/admin_reports_v1/classes.rb'
require 'google/apis/admin_reports_v1/representations.rb'
module Google
module Apis
# Admin Reports API
#
# Allows the administrators of Google Apps customers to fetch reports about the
# usage, collaboration, security and risk for their users.
#
# @see https://developers.google.com/admin-sdk/reports/
module AdminReportsV1
VERSION = 'ReportsV1'
REVISION = '20150429'
# View audit reports of Google Apps for your domain
AUTH_ADMIN_REPORTS_AUDIT_READONLY = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
# View usage reports of Google Apps for your domain
AUTH_ADMIN_REPORTS_USAGE_READONLY = 'https://www.googleapis.com/auth/admin.reports.usage.readonly'
end
end
end

View File

@ -1,582 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdminReportsV1
# JSON template for a collection of activites.
class Activities
include Google::Apis::Core::Hashable
# ETag of the resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Each record in read response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdminReportsV1::Activity>]
attr_accessor :items
# Kind of list response this is.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token for retrieving the next page
# 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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# JSON template for the activity resource.
class Activity
include Google::Apis::Core::Hashable
# User doing the action.
# Corresponds to the JSON property `actor`
# @return [Google::Apis::AdminReportsV1::Activity::Actor]
attr_accessor :actor
# ETag of the entry.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Activity events.
# Corresponds to the JSON property `events`
# @return [Array<Google::Apis::AdminReportsV1::Activity::Event>]
attr_accessor :events
# Unique identifier for each activity record.
# Corresponds to the JSON property `id`
# @return [Google::Apis::AdminReportsV1::Activity::Id]
attr_accessor :id
# IP Address of the user doing the action.
# Corresponds to the JSON property `ipAddress`
# @return [String]
attr_accessor :ip_address
# Kind of resource this is.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Domain of source customer.
# Corresponds to the JSON property `ownerDomain`
# @return [String]
attr_accessor :owner_domain
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@actor = args[:actor] unless args[:actor].nil?
@etag = args[:etag] unless args[:etag].nil?
@events = args[:events] unless args[:events].nil?
@id = args[:id] unless args[:id].nil?
@ip_address = args[:ip_address] unless args[:ip_address].nil?
@kind = args[:kind] unless args[:kind].nil?
@owner_domain = args[:owner_domain] unless args[:owner_domain].nil?
end
# User doing the action.
class Actor
include Google::Apis::Core::Hashable
# User or OAuth 2LO request.
# Corresponds to the JSON property `callerType`
# @return [String]
attr_accessor :caller_type
# Email address of the user.
# Corresponds to the JSON property `email`
# @return [String]
attr_accessor :email
# For OAuth 2LO API requests, consumer_key of the requestor.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# Obfuscated user id of the user.
# Corresponds to the JSON property `profileId`
# @return [String]
attr_accessor :profile_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@caller_type = args[:caller_type] unless args[:caller_type].nil?
@email = args[:email] unless args[:email].nil?
@key = args[:key] unless args[:key].nil?
@profile_id = args[:profile_id] unless args[:profile_id].nil?
end
end
#
class Event
include Google::Apis::Core::Hashable
# Name of event.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Parameter value pairs for various applications.
# Corresponds to the JSON property `parameters`
# @return [Array<Google::Apis::AdminReportsV1::Activity::Event::Parameter>]
attr_accessor :parameters
# Type of event.
# 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] unless args[:name].nil?
@parameters = args[:parameters] unless args[:parameters].nil?
@type = args[:type] unless args[:type].nil?
end
#
class Parameter
include Google::Apis::Core::Hashable
# Boolean value of the parameter.
# Corresponds to the JSON property `boolValue`
# @return [Boolean]
attr_accessor :bool_value
alias_method :bool_value?, :bool_value
# Integral value of the parameter.
# Corresponds to the JSON property `intValue`
# @return [String]
attr_accessor :int_value
# Multi-int value of the parameter.
# Corresponds to the JSON property `multiIntValue`
# @return [Array<String>]
attr_accessor :multi_int_value
# Multi-string value of the parameter.
# Corresponds to the JSON property `multiValue`
# @return [Array<String>]
attr_accessor :multi_value
# The name of the parameter.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# String value of the parameter.
# 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)
@bool_value = args[:bool_value] unless args[:bool_value].nil?
@int_value = args[:int_value] unless args[:int_value].nil?
@multi_int_value = args[:multi_int_value] unless args[:multi_int_value].nil?
@multi_value = args[:multi_value] unless args[:multi_value].nil?
@name = args[:name] unless args[:name].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
# Unique identifier for each activity record.
class Id
include Google::Apis::Core::Hashable
# Application name to which the event belongs.
# Corresponds to the JSON property `applicationName`
# @return [String]
attr_accessor :application_name
# Obfuscated customer ID of the source customer.
# Corresponds to the JSON property `customerId`
# @return [String]
attr_accessor :customer_id
# Time of occurrence of the activity.
# Corresponds to the JSON property `time`
# @return [DateTime]
attr_accessor :time
# Unique qualifier if multiple events have the same time.
# Corresponds to the JSON property `uniqueQualifier`
# @return [String]
attr_accessor :unique_qualifier
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@application_name = args[:application_name] unless args[:application_name].nil?
@customer_id = args[:customer_id] unless args[:customer_id].nil?
@time = args[:time] unless args[:time].nil?
@unique_qualifier = args[:unique_qualifier] unless args[:unique_qualifier].nil?
end
end
end
# An notification channel used to watch for resource changes.
class Channel
include Google::Apis::Core::Hashable
# The address where notifications are delivered for this channel.
# Corresponds to the JSON property `address`
# @return [String]
attr_accessor :address
# Date and time of notification channel expiration, expressed as a Unix
# timestamp, in milliseconds. Optional.
# Corresponds to the JSON property `expiration`
# @return [String]
attr_accessor :expiration
# A UUID or similar unique string that identifies this channel.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies this as a notification channel used to watch for changes to a
# resource. Value: the fixed string "api#channel".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Additional parameters controlling delivery channel behavior. Optional.
# Corresponds to the JSON property `params`
# @return [Hash<String,String>]
attr_accessor :params
# A Boolean value to indicate whether payload is wanted. Optional.
# Corresponds to the JSON property `payload`
# @return [Boolean]
attr_accessor :payload
alias_method :payload?, :payload
# An opaque ID that identifies the resource being watched on this channel.
# Stable across different API versions.
# Corresponds to the JSON property `resourceId`
# @return [String]
attr_accessor :resource_id
# A version-specific identifier for the watched resource.
# Corresponds to the JSON property `resourceUri`
# @return [String]
attr_accessor :resource_uri
# An arbitrary string delivered to the target address with each notification
# delivered over this channel. Optional.
# Corresponds to the JSON property `token`
# @return [String]
attr_accessor :token
# The type of delivery mechanism used for this channel.
# 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)
@address = args[:address] unless args[:address].nil?
@expiration = args[:expiration] unless args[:expiration].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@params = args[:params] unless args[:params].nil?
@payload = args[:payload] unless args[:payload].nil?
@resource_id = args[:resource_id] unless args[:resource_id].nil?
@resource_uri = args[:resource_uri] unless args[:resource_uri].nil?
@token = args[:token] unless args[:token].nil?
@type = args[:type] unless args[:type].nil?
end
end
# JSON template for a usage report.
class UsageReport
include Google::Apis::Core::Hashable
# The date to which the record belongs.
# Corresponds to the JSON property `date`
# @return [String]
attr_accessor :date
# Information about the type of the item.
# Corresponds to the JSON property `entity`
# @return [Google::Apis::AdminReportsV1::UsageReport::Entity]
attr_accessor :entity
# ETag of the resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The kind of object.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Parameter value pairs for various applications.
# Corresponds to the JSON property `parameters`
# @return [Array<Google::Apis::AdminReportsV1::UsageReport::Parameter>]
attr_accessor :parameters
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] unless args[:date].nil?
@entity = args[:entity] unless args[:entity].nil?
@etag = args[:etag] unless args[:etag].nil?
@kind = args[:kind] unless args[:kind].nil?
@parameters = args[:parameters] unless args[:parameters].nil?
end
# Information about the type of the item.
class Entity
include Google::Apis::Core::Hashable
# Obfuscated customer id for the record.
# Corresponds to the JSON property `customerId`
# @return [String]
attr_accessor :customer_id
# Obfuscated user id for the record.
# Corresponds to the JSON property `profileId`
# @return [String]
attr_accessor :profile_id
# The type of item, can be a customer or user.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# user's email.
# Corresponds to the JSON property `userEmail`
# @return [String]
attr_accessor :user_email
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@customer_id = args[:customer_id] unless args[:customer_id].nil?
@profile_id = args[:profile_id] unless args[:profile_id].nil?
@type = args[:type] unless args[:type].nil?
@user_email = args[:user_email] unless args[:user_email].nil?
end
end
#
class Parameter
include Google::Apis::Core::Hashable
# Boolean value of the parameter.
# Corresponds to the JSON property `boolValue`
# @return [Boolean]
attr_accessor :bool_value
alias_method :bool_value?, :bool_value
# RFC 3339 formatted value of the parameter.
# Corresponds to the JSON property `datetimeValue`
# @return [DateTime]
attr_accessor :datetime_value
# Integral value of the parameter.
# Corresponds to the JSON property `intValue`
# @return [String]
attr_accessor :int_value
# Nested message value of the parameter.
# Corresponds to the JSON property `msgValue`
# @return [Array<Hash<String,Object>>]
attr_accessor :msg_value
# The name of the parameter.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# String value of the parameter.
# Corresponds to the JSON property `stringValue`
# @return [String]
attr_accessor :string_value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bool_value = args[:bool_value] unless args[:bool_value].nil?
@datetime_value = args[:datetime_value] unless args[:datetime_value].nil?
@int_value = args[:int_value] unless args[:int_value].nil?
@msg_value = args[:msg_value] unless args[:msg_value].nil?
@name = args[:name] unless args[:name].nil?
@string_value = args[:string_value] unless args[:string_value].nil?
end
end
end
# JSON template for a collection of usage reports.
class UsageReports
include Google::Apis::Core::Hashable
# ETag of the resource.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The kind of object.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token for retrieving the next page
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Various application parameter records.
# Corresponds to the JSON property `usageReports`
# @return [Array<Google::Apis::AdminReportsV1::UsageReport>]
attr_accessor :usage_reports
# Warnings if any.
# Corresponds to the JSON property `warnings`
# @return [Array<Google::Apis::AdminReportsV1::UsageReports::Warning>]
attr_accessor :warnings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] unless args[:etag].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@usage_reports = args[:usage_reports] unless args[:usage_reports].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
end
#
class Warning
include Google::Apis::Core::Hashable
# Machine readable code / warning type.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# Key-Value pairs to give detailed information on the warning.
# Corresponds to the JSON property `data`
# @return [Array<Google::Apis::AdminReportsV1::UsageReports::Warning::Datum>]
attr_accessor :data
# Human readable message for the warning.
# 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] unless args[:code].nil?
@data = args[:data] unless args[:data].nil?
@message = args[:message] unless args[:message].nil?
end
#
class Datum
include Google::Apis::Core::Hashable
# Key associated with a key-value pair to give detailed information on the
# warning.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# Value associated with a key-value pair to give detailed information on the
# warning.
# 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] unless args[:key].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
end
end
end
end

View File

@ -1,231 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdminReportsV1
class Activities
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Activity
class Representation < Google::Apis::Core::JsonRepresentation; end
class Actor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Event
class Representation < Google::Apis::Core::JsonRepresentation; end
class Parameter
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Id
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Channel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UsageReport
class Representation < Google::Apis::Core::JsonRepresentation; end
class Entity
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Parameter
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class UsageReports
class Representation < Google::Apis::Core::JsonRepresentation; end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
end
# @private
class Activities
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdminReportsV1::Activity, decorator: Google::Apis::AdminReportsV1::Activity::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Activity
class Representation < Google::Apis::Core::JsonRepresentation
property :actor, as: 'actor', class: Google::Apis::AdminReportsV1::Activity::Actor, decorator: Google::Apis::AdminReportsV1::Activity::Actor::Representation
property :etag, as: 'etag'
collection :events, as: 'events', class: Google::Apis::AdminReportsV1::Activity::Event, decorator: Google::Apis::AdminReportsV1::Activity::Event::Representation
property :id, as: 'id', class: Google::Apis::AdminReportsV1::Activity::Id, decorator: Google::Apis::AdminReportsV1::Activity::Id::Representation
property :ip_address, as: 'ipAddress'
property :kind, as: 'kind'
property :owner_domain, as: 'ownerDomain'
end
# @private
class Actor
class Representation < Google::Apis::Core::JsonRepresentation
property :caller_type, as: 'callerType'
property :email, as: 'email'
property :key, as: 'key'
property :profile_id, as: 'profileId'
end
end
# @private
class Event
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
collection :parameters, as: 'parameters', class: Google::Apis::AdminReportsV1::Activity::Event::Parameter, decorator: Google::Apis::AdminReportsV1::Activity::Event::Parameter::Representation
property :type, as: 'type'
end
# @private
class Parameter
class Representation < Google::Apis::Core::JsonRepresentation
property :bool_value, as: 'boolValue'
property :int_value, as: 'intValue'
collection :multi_int_value, as: 'multiIntValue'
collection :multi_value, as: 'multiValue'
property :name, as: 'name'
property :value, as: 'value'
end
end
end
# @private
class Id
class Representation < Google::Apis::Core::JsonRepresentation
property :application_name, as: 'applicationName'
property :customer_id, as: 'customerId'
property :time, as: 'time', type: DateTime
property :unique_qualifier, as: 'uniqueQualifier'
end
end
end
# @private
class Channel
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address'
property :expiration, as: 'expiration'
property :id, as: 'id'
property :kind, as: 'kind'
hash :params, as: 'params'
property :payload, as: 'payload'
property :resource_id, as: 'resourceId'
property :resource_uri, as: 'resourceUri'
property :token, as: 'token'
property :type, as: 'type'
end
end
# @private
class UsageReport
class Representation < Google::Apis::Core::JsonRepresentation
property :date, as: 'date'
property :entity, as: 'entity', class: Google::Apis::AdminReportsV1::UsageReport::Entity, decorator: Google::Apis::AdminReportsV1::UsageReport::Entity::Representation
property :etag, as: 'etag'
property :kind, as: 'kind'
collection :parameters, as: 'parameters', class: Google::Apis::AdminReportsV1::UsageReport::Parameter, decorator: Google::Apis::AdminReportsV1::UsageReport::Parameter::Representation
end
# @private
class Entity
class Representation < Google::Apis::Core::JsonRepresentation
property :customer_id, as: 'customerId'
property :profile_id, as: 'profileId'
property :type, as: 'type'
property :user_email, as: 'userEmail'
end
end
# @private
class Parameter
class Representation < Google::Apis::Core::JsonRepresentation
property :bool_value, as: 'boolValue'
property :datetime_value, as: 'datetimeValue', type: DateTime
property :int_value, as: 'intValue'
collection :msg_value, as: 'msgValue'
property :name, as: 'name'
property :string_value, as: 'stringValue'
end
end
end
# @private
class UsageReports
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
collection :usage_reports, as: 'usageReports', class: Google::Apis::AdminReportsV1::UsageReport, decorator: Google::Apis::AdminReportsV1::UsageReport::Representation
collection :warnings, as: 'warnings', class: Google::Apis::AdminReportsV1::UsageReports::Warning, decorator: Google::Apis::AdminReportsV1::UsageReports::Warning::Representation
end
# @private
class Warning
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::AdminReportsV1::UsageReports::Warning::Datum, decorator: Google::Apis::AdminReportsV1::UsageReports::Warning::Datum::Representation
property :message, as: 'message'
end
# @private
class Datum
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
end
end
end

View File

@ -1,341 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdminReportsV1
# Admin Reports API
#
# Allows the administrators of Google Apps customers to fetch reports about the
# usage, collaboration, security and risk for their users.
#
# @example
# require 'google/apis/admin_reports_v1'
#
# Admin = Google::Apis::AdminReportsV1 # Alias the module
# service = Admin::ReportsService.new
#
# @see https://developers.google.com/admin-sdk/reports/
class ReportsService < 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/', 'admin/reports/v1/')
end
# Retrieves a list of activities for a specific customer and application.
# @param [String] user_key
# Represents the profile id or the user email for which the data should be
# filtered. When 'all' is specified as the userKey, it returns usageReports for
# all users.
# @param [String] application_name
# Application name for which the events are to be retrieved.
# @param [String] actor_ip_address
# IP Address of host where the event was performed. Supports both IPv4 and IPv6
# addresses.
# @param [String] customer_id
# Represents the customer for which the data is to be fetched.
# @param [String] end_time
# Return events which occured at or before this time.
# @param [String] event_name
# Name of the event being queried.
# @param [String] filters
# Event parameters in the form [parameter1 name][operator][parameter1 value],[
# parameter2 name][operator][parameter2 value],...
# @param [Fixnum] max_results
# Number of activity records to be shown in each page.
# @param [String] page_token
# Token to specify next page.
# @param [String] start_time
# Return events which occured at or after this time.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AdminReportsV1::Activities] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdminReportsV1::Activities]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_activities(user_key, application_name, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'activity/users/{userKey}/applications/{applicationName}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdminReportsV1::Activities::Representation
command.response_class = Google::Apis::AdminReportsV1::Activities
command.params['userKey'] = user_key unless user_key.nil?
command.params['applicationName'] = application_name unless application_name.nil?
command.query['actorIpAddress'] = actor_ip_address unless actor_ip_address.nil?
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['eventName'] = event_name unless event_name.nil?
command.query['filters'] = filters unless filters.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTime'] = start_time unless start_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
# Push changes to activities
# @param [String] user_key
# Represents the profile id or the user email for which the data should be
# filtered. When 'all' is specified as the userKey, it returns usageReports for
# all users.
# @param [String] application_name
# Application name for which the events are to be retrieved.
# @param [Google::Apis::AdminReportsV1::Channel] channel_object
# @param [String] actor_ip_address
# IP Address of host where the event was performed. Supports both IPv4 and IPv6
# addresses.
# @param [String] customer_id
# Represents the customer for which the data is to be fetched.
# @param [String] end_time
# Return events which occured at or before this time.
# @param [String] event_name
# Name of the event being queried.
# @param [String] filters
# Event parameters in the form [parameter1 name][operator][parameter1 value],[
# parameter2 name][operator][parameter2 value],...
# @param [Fixnum] max_results
# Number of activity records to be shown in each page.
# @param [String] page_token
# Token to specify next page.
# @param [String] start_time
# Return events which occured at or after this time.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AdminReportsV1::Channel] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdminReportsV1::Channel]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def watch_activity(user_key, application_name, channel_object = nil, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'activity/users/{userKey}/applications/{applicationName}/watch'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::AdminReportsV1::Channel::Representation
command.request_object = channel_object
command.response_representation = Google::Apis::AdminReportsV1::Channel::Representation
command.response_class = Google::Apis::AdminReportsV1::Channel
command.params['userKey'] = user_key unless user_key.nil?
command.params['applicationName'] = application_name unless application_name.nil?
command.query['actorIpAddress'] = actor_ip_address unless actor_ip_address.nil?
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['eventName'] = event_name unless event_name.nil?
command.query['filters'] = filters unless filters.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTime'] = start_time unless start_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
# Stop watching resources through this channel
# @param [Google::Apis::AdminReportsV1::Channel] channel_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 stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '/admin/reports_v1/channels/stop'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::AdminReportsV1::Channel::Representation
command.request_object = channel_object
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 report which is a collection of properties / statistics for a
# specific customer.
# @param [String] date
# Represents the date in yyyy-mm-dd format for which the data is to be fetched.
# @param [String] customer_id
# Represents the customer for which the data is to be fetched.
# @param [String] page_token
# Token to specify next page.
# @param [String] parameters
# Represents the application name, parameter name pairs to fetch in csv as
# app_name1:param_name1, app_name2:param_name2.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AdminReportsV1::UsageReports] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdminReportsV1::UsageReports]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customer_usage_report(date, customer_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'usage/dates/{date}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdminReportsV1::UsageReports::Representation
command.response_class = Google::Apis::AdminReportsV1::UsageReports
command.params['date'] = date unless date.nil?
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['parameters'] = parameters unless parameters.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 report which is a collection of properties / statistics for a set
# of users.
# @param [String] user_key
# Represents the profile id or the user email for which the data should be
# filtered.
# @param [String] date
# Represents the date in yyyy-mm-dd format for which the data is to be fetched.
# @param [String] customer_id
# Represents the customer for which the data is to be fetched.
# @param [String] filters
# Represents the set of filters including parameter operator value.
# @param [Fixnum] max_results
# Maximum number of results to return. Maximum allowed is 1000
# @param [String] page_token
# Token to specify next page.
# @param [String] parameters
# Represents the application name, parameter name pairs to fetch in csv as
# app_name1:param_name1, app_name2:param_name2.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AdminReportsV1::UsageReports] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AdminReportsV1::UsageReports]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_usage_report(user_key, date, customer_id: nil, filters: nil, max_results: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'usage/users/{userKey}/dates/{date}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AdminReportsV1::UsageReports::Representation
command.response_class = Google::Apis::AdminReportsV1::UsageReports
command.params['userKey'] = user_key unless user_key.nil?
command.params['date'] = date unless date.nil?
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['filters'] = filters unless filters.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['parameters'] = parameters unless parameters.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

View File

@ -1,38 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/adsense_v1_4/service.rb'
require 'google/apis/adsense_v1_4/classes.rb'
require 'google/apis/adsense_v1_4/representations.rb'
module Google
module Apis
# AdSense Management API
#
# Gives AdSense publishers access to their inventory and the ability to generate
# reports
#
# @see https://developers.google.com/adsense/management/
module AdsenseV1_4
VERSION = 'V1_4'
REVISION = '20150519'
# View and manage your AdSense data
AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense'
# View your AdSense data
AUTH_ADSENSE_READONLY = 'https://www.googleapis.com/auth/adsense.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,493 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdsenseV1_4
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdCode
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
class Colors
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Font
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AdUnit
class Representation < Google::Apis::Core::JsonRepresentation; end
class ContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
class BackupOption
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class FeedAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MobileContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AdUnits
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GenerateReportResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
class Header
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Alert
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Alerts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
class TargetingInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Metadata
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Payment
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Payments
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ReportingMetadataEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedAdStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedAdStyles
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedReport
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SavedReports
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Account
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :premium, as: 'premium'
collection :sub_accounts, as: 'subAccounts', class: Google::Apis::AdsenseV1_4::Account, decorator: Google::Apis::AdsenseV1_4::Account::Representation
property :timezone, as: 'timezone'
end
end
# @private
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::Account, decorator: Google::Apis::AdsenseV1_4::Account::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation
property :arc_opt_in, as: 'arcOptIn'
property :arc_review_mode, as: 'arcReviewMode'
property :id, as: 'id'
property :kind, as: 'kind'
property :product_code, as: 'productCode'
property :supports_reporting, as: 'supportsReporting'
end
end
# @private
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::AdClient, decorator: Google::Apis::AdsenseV1_4::AdClient::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AdCode
class Representation < Google::Apis::Core::JsonRepresentation
property :ad_code, as: 'adCode'
property :kind, as: 'kind'
end
end
# @private
class AdStyle
class Representation < Google::Apis::Core::JsonRepresentation
property :colors, as: 'colors', class: Google::Apis::AdsenseV1_4::AdStyle::Colors, decorator: Google::Apis::AdsenseV1_4::AdStyle::Colors::Representation
property :corners, as: 'corners'
property :font, as: 'font', class: Google::Apis::AdsenseV1_4::AdStyle::Font, decorator: Google::Apis::AdsenseV1_4::AdStyle::Font::Representation
property :kind, as: 'kind'
end
# @private
class Colors
class Representation < Google::Apis::Core::JsonRepresentation
property :background, as: 'background'
property :border, as: 'border'
property :text, as: 'text'
property :title, as: 'title'
property :url, as: 'url'
end
end
# @private
class Font
class Representation < Google::Apis::Core::JsonRepresentation
property :family, as: 'family'
property :size, as: 'size'
end
end
end
# @private
class AdUnit
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :content_ads_settings, as: 'contentAdsSettings', class: Google::Apis::AdsenseV1_4::AdUnit::ContentAdsSettings, decorator: Google::Apis::AdsenseV1_4::AdUnit::ContentAdsSettings::Representation
property :custom_style, as: 'customStyle', class: Google::Apis::AdsenseV1_4::AdStyle, decorator: Google::Apis::AdsenseV1_4::AdStyle::Representation
property :feed_ads_settings, as: 'feedAdsSettings', class: Google::Apis::AdsenseV1_4::AdUnit::FeedAdsSettings, decorator: Google::Apis::AdsenseV1_4::AdUnit::FeedAdsSettings::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :mobile_content_ads_settings, as: 'mobileContentAdsSettings', class: Google::Apis::AdsenseV1_4::AdUnit::MobileContentAdsSettings, decorator: Google::Apis::AdsenseV1_4::AdUnit::MobileContentAdsSettings::Representation
property :name, as: 'name'
property :saved_style_id, as: 'savedStyleId'
property :status, as: 'status'
end
# @private
class ContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :backup_option, as: 'backupOption', class: Google::Apis::AdsenseV1_4::AdUnit::ContentAdsSettings::BackupOption, decorator: Google::Apis::AdsenseV1_4::AdUnit::ContentAdsSettings::BackupOption::Representation
property :size, as: 'size'
property :type, as: 'type'
end
# @private
class BackupOption
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :type, as: 'type'
property :url, as: 'url'
end
end
end
# @private
class FeedAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :ad_position, as: 'adPosition'
property :frequency, as: 'frequency'
property :minimum_word_count, as: 'minimumWordCount'
property :type, as: 'type'
end
end
# @private
class MobileContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :markup_language, as: 'markupLanguage'
property :scripting_language, as: 'scriptingLanguage'
property :size, as: 'size'
property :type, as: 'type'
end
end
end
# @private
class AdUnits
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::AdUnit, decorator: Google::Apis::AdsenseV1_4::AdUnit::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class GenerateReportResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :averages, as: 'averages'
property :end_date, as: 'endDate'
collection :headers, as: 'headers', class: Google::Apis::AdsenseV1_4::GenerateReportResponse::Header, decorator: Google::Apis::AdsenseV1_4::GenerateReportResponse::Header::Representation
property :kind, as: 'kind'
collection :rows, as: 'rows', :class => Array do
include Representable::JSON::Collection
items
end
property :start_date, as: 'startDate'
property :total_matched_rows, as: 'totalMatchedRows'
collection :totals, as: 'totals'
collection :warnings, as: 'warnings'
end
# @private
class Header
class Representation < Google::Apis::Core::JsonRepresentation
property :currency, as: 'currency'
property :name, as: 'name'
property :type, as: 'type'
end
end
end
# @private
class Alert
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :is_dismissible, as: 'isDismissible'
property :kind, as: 'kind'
property :message, as: 'message'
property :severity, as: 'severity'
property :type, as: 'type'
end
end
# @private
class Alerts
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::Alert, decorator: Google::Apis::AdsenseV1_4::Alert::Representation
property :kind, as: 'kind'
end
end
# @private
class CustomChannel
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::AdsenseV1_4::CustomChannel::TargetingInfo, decorator: Google::Apis::AdsenseV1_4::CustomChannel::TargetingInfo::Representation
end
# @private
class TargetingInfo
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
# @private
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::CustomChannel, decorator: Google::Apis::AdsenseV1_4::CustomChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Metadata
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::ReportingMetadataEntry, decorator: Google::Apis::AdsenseV1_4::ReportingMetadataEntry::Representation
property :kind, as: 'kind'
end
end
# @private
class Payment
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :payment_amount, as: 'paymentAmount'
property :payment_amount_currency_code, as: 'paymentAmountCurrencyCode'
property :payment_date, as: 'paymentDate'
end
end
# @private
class Payments
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::Payment, decorator: Google::Apis::AdsenseV1_4::Payment::Representation
property :kind, as: 'kind'
end
end
# @private
class ReportingMetadataEntry
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
# @private
class SavedAdStyle
class Representation < Google::Apis::Core::JsonRepresentation
property :ad_style, as: 'adStyle', class: Google::Apis::AdsenseV1_4::AdStyle, decorator: Google::Apis::AdsenseV1_4::AdStyle::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class SavedAdStyles
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::SavedAdStyle, decorator: Google::Apis::AdsenseV1_4::SavedAdStyle::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class SavedReport
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class SavedReports
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::SavedReport, decorator: Google::Apis::AdsenseV1_4::SavedReport::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :url_pattern, as: 'urlPattern'
end
end
# @private
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsenseV1_4::UrlChannel, decorator: Google::Apis::AdsenseV1_4::UrlChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/adsensehost_v4_1/service.rb'
require 'google/apis/adsensehost_v4_1/classes.rb'
require 'google/apis/adsensehost_v4_1/representations.rb'
module Google
module Apis
# AdSense Host API
#
# Gives AdSense Hosts access to report generation, ad code generation, and
# publisher management capabilities.
#
# @see https://developers.google.com/adsense/host/
module AdsensehostV4_1
VERSION = 'V4_1'
REVISION = '20150326'
# View and manage your AdSense host data and associated accounts
AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost'
end
end
end

View File

@ -1,834 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdsensehostV4_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 adsensehost#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
# Approval status of this account. One of: PENDING, APPROVED, DISABLED.
# 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)
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@status = args[:status] unless args[:status].nil?
end
end
#
class Accounts
include Google::Apis::Core::Hashable
# ETag of this response for caching purposes.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# The accounts returned in this list response.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AdsensehostV4_1::Account>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#accounts.
# 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)
@etag = args[:etag] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
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 adsensehost#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] unless args[:arc_opt_in].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@product_code = args[:product_code] unless args[:product_code].nil?
@supports_reporting = args[:supports_reporting] unless args[:supports_reporting].nil?
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::AdsensehostV4_1::AdClient>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class AdCode
include Google::Apis::Core::Hashable
# The ad code snippet.
# Corresponds to the JSON property `adCode`
# @return [String]
attr_accessor :ad_code
# Kind this is, in this case adsensehost#adCode.
# 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)
@ad_code = args[:ad_code] unless args[:ad_code].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
#
class AdStyle
include Google::Apis::Core::Hashable
# The colors included in the style. These are represented as six hexadecimal
# characters, similar to HTML color codes, but without the leading hash.
# Corresponds to the JSON property `colors`
# @return [Google::Apis::AdsensehostV4_1::AdStyle::Colors]
attr_accessor :colors
# The style of the corners in the ad. Possible values are SQUARE,
# SLIGHTLY_ROUNDED and VERY_ROUNDED.
# Corresponds to the JSON property `corners`
# @return [String]
attr_accessor :corners
# The font which is included in the style.
# Corresponds to the JSON property `font`
# @return [Google::Apis::AdsensehostV4_1::AdStyle::Font]
attr_accessor :font
# Kind this is, in this case adsensehost#adStyle.
# 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)
@colors = args[:colors] unless args[:colors].nil?
@corners = args[:corners] unless args[:corners].nil?
@font = args[:font] unless args[:font].nil?
@kind = args[:kind] unless args[:kind].nil?
end
# The colors included in the style. These are represented as six hexadecimal
# characters, similar to HTML color codes, but without the leading hash.
class Colors
include Google::Apis::Core::Hashable
# The color of the ad background.
# Corresponds to the JSON property `background`
# @return [String]
attr_accessor :background
# The color of the ad border.
# Corresponds to the JSON property `border`
# @return [String]
attr_accessor :border
# The color of the ad text.
# Corresponds to the JSON property `text`
# @return [String]
attr_accessor :text
# The color of the ad title.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
# The color of the ad 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)
@background = args[:background] unless args[:background].nil?
@border = args[:border] unless args[:border].nil?
@text = args[:text] unless args[:text].nil?
@title = args[:title] unless args[:title].nil?
@url = args[:url] unless args[:url].nil?
end
end
# The font which is included in the style.
class Font
include Google::Apis::Core::Hashable
# The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY,
# ADSENSE_DEFAULT_FAMILY, ARIAL, TIMES and VERDANA.
# Corresponds to the JSON property `family`
# @return [String]
attr_accessor :family
# The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE,
# ADSENSE_DEFAULT_SIZE, SMALL, MEDIUM and LARGE.
# Corresponds to the JSON property `size`
# @return [String]
attr_accessor :size
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@family = args[:family] unless args[:family].nil?
@size = args[:size] unless args[:size].nil?
end
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
# Settings specific to content ads (AFC) and highend mobile content ads (AFMC).
# Corresponds to the JSON property `contentAdsSettings`
# @return [Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings]
attr_accessor :content_ads_settings
# Custom style information specific to this ad unit.
# Corresponds to the JSON property `customStyle`
# @return [Google::Apis::AdsensehostV4_1::AdStyle]
attr_accessor :custom_style
# 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 adsensehost#adUnit.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Settings specific to WAP mobile content ads (AFMC).
# Corresponds to the JSON property `mobileContentAdsSettings`
# @return [Google::Apis::AdsensehostV4_1::AdUnit::MobileContentAdsSettings]
attr_accessor :mobile_content_ads_settings
# 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] unless args[:code].nil?
@content_ads_settings = args[:content_ads_settings] unless args[:content_ads_settings].nil?
@custom_style = args[:custom_style] unless args[:custom_style].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@mobile_content_ads_settings = args[:mobile_content_ads_settings] unless args[:mobile_content_ads_settings].nil?
@name = args[:name] unless args[:name].nil?
@status = args[:status] unless args[:status].nil?
end
# Settings specific to content ads (AFC) and highend mobile content ads (AFMC).
class ContentAdsSettings
include Google::Apis::Core::Hashable
# The backup option to be used in instances where no ad is available.
# Corresponds to the JSON property `backupOption`
# @return [Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::BackupOption]
attr_accessor :backup_option
# Size of this ad unit. Size values are in the form SIZE_`width`_`height`.
# Corresponds to the JSON property `size`
# @return [String]
attr_accessor :size
# Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and LINK.
# 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)
@backup_option = args[:backup_option] unless args[:backup_option].nil?
@size = args[:size] unless args[:size].nil?
@type = args[:type] unless args[:type].nil?
end
# The backup option to be used in instances where no ad is available.
class BackupOption
include Google::Apis::Core::Hashable
# Color to use when type is set to COLOR. These are represented as six
# hexadecimal characters, similar to HTML color codes, but without the leading
# hash.
# Corresponds to the JSON property `color`
# @return [String]
attr_accessor :color
# Type of the backup option. Possible values are BLANK, COLOR and URL.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# URL to use when type is set to 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)
@color = args[:color] unless args[:color].nil?
@type = args[:type] unless args[:type].nil?
@url = args[:url] unless args[:url].nil?
end
end
end
# Settings specific to WAP mobile content ads (AFMC).
class MobileContentAdsSettings
include Google::Apis::Core::Hashable
# The markup language to use for this ad unit.
# Corresponds to the JSON property `markupLanguage`
# @return [String]
attr_accessor :markup_language
# The scripting language to use for this ad unit.
# Corresponds to the JSON property `scriptingLanguage`
# @return [String]
attr_accessor :scripting_language
# Size of this ad unit.
# Corresponds to the JSON property `size`
# @return [String]
attr_accessor :size
# Type of this ad unit.
# 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)
@markup_language = args[:markup_language] unless args[:markup_language].nil?
@scripting_language = args[:scripting_language] unless args[:scripting_language].nil?
@size = args[:size] unless args[:size].nil?
@type = args[:type] unless args[:type].nil?
end
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::AdsensehostV4_1::AdUnit>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
#
class AssociationSession
include Google::Apis::Core::Hashable
# Hosted account id of the associated publisher after association. Present if
# status is ACCEPTED.
# Corresponds to the JSON property `accountId`
# @return [String]
attr_accessor :account_id
# Unique identifier of this association session.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Kind of resource this is, in this case adsensehost#associationSession.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The products to associate with the user. Options: AFC, AFF, AFS, AFMC
# Corresponds to the JSON property `productCodes`
# @return [Array<String>]
attr_accessor :product_codes
# Redirect URL of this association session. Used to redirect users into the
# AdSense association flow.
# Corresponds to the JSON property `redirectUrl`
# @return [String]
attr_accessor :redirect_url
# Status of the completed association, available once the association callback
# token has been verified. One of ACCEPTED, REJECTED, or ERROR.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# The preferred locale of the user themselves when going through the AdSense
# association flow.
# Corresponds to the JSON property `userLocale`
# @return [String]
attr_accessor :user_locale
# The locale of the user's hosted website.
# Corresponds to the JSON property `websiteLocale`
# @return [String]
attr_accessor :website_locale
# The URL of the user's hosted website.
# Corresponds to the JSON property `websiteUrl`
# @return [String]
attr_accessor :website_url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@account_id = args[:account_id] unless args[:account_id].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@product_codes = args[:product_codes] unless args[:product_codes].nil?
@redirect_url = args[:redirect_url] unless args[:redirect_url].nil?
@status = args[:status] unless args[:status].nil?
@user_locale = args[:user_locale] unless args[:user_locale].nil?
@website_locale = args[:website_locale] unless args[:website_locale].nil?
@website_url = args[:website_url] unless args[:website_url].nil?
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 adsensehost#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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
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::AdsensehostV4_1::CustomChannel>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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::AdsensehostV4_1::Report::Header>]
attr_accessor :headers
# Kind this is, in this case adsensehost#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 [String]
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] unless args[:averages].nil?
@headers = args[:headers] unless args[:headers].nil?
@kind = args[:kind] unless args[:kind].nil?
@rows = args[:rows] unless args[:rows].nil?
@total_matched_rows = args[:total_matched_rows] unless args[:total_matched_rows].nil?
@totals = args[:totals] unless args[:totals].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
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] unless args[:currency].nil?
@name = args[:name] unless args[:name].nil?
@type = args[:type] unless args[:type].nil?
end
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 adsensehost#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] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@url_pattern = args[:url_pattern] unless args[:url_pattern].nil?
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::AdsensehostV4_1::UrlChannel>]
attr_accessor :items
# Kind of list this is, in this case adsensehost#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] unless args[:etag].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
end
end
end

View File

@ -1,327 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AdsensehostV4_1
class Account
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClient
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdCode
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
class Colors
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Font
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AdUnit
class Representation < Google::Apis::Core::JsonRepresentation; end
class ContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
class BackupOption
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class MobileContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class AdUnits
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AssociationSession
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Report
class Representation < Google::Apis::Core::JsonRepresentation; end
class Header
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Account
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :status, as: 'status'
end
end
# @private
class Accounts
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::Account, decorator: Google::Apis::AdsensehostV4_1::Account::Representation
property :kind, as: 'kind'
end
end
# @private
class AdClient
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
# @private
class AdClients
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::AdClient, decorator: Google::Apis::AdsensehostV4_1::AdClient::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AdCode
class Representation < Google::Apis::Core::JsonRepresentation
property :ad_code, as: 'adCode'
property :kind, as: 'kind'
end
end
# @private
class AdStyle
class Representation < Google::Apis::Core::JsonRepresentation
property :colors, as: 'colors', class: Google::Apis::AdsensehostV4_1::AdStyle::Colors, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Colors::Representation
property :corners, as: 'corners'
property :font, as: 'font', class: Google::Apis::AdsensehostV4_1::AdStyle::Font, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Font::Representation
property :kind, as: 'kind'
end
# @private
class Colors
class Representation < Google::Apis::Core::JsonRepresentation
property :background, as: 'background'
property :border, as: 'border'
property :text, as: 'text'
property :title, as: 'title'
property :url, as: 'url'
end
end
# @private
class Font
class Representation < Google::Apis::Core::JsonRepresentation
property :family, as: 'family'
property :size, as: 'size'
end
end
end
# @private
class AdUnit
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :content_ads_settings, as: 'contentAdsSettings', class: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings, decorator: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::Representation
property :custom_style, as: 'customStyle', class: Google::Apis::AdsensehostV4_1::AdStyle, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :mobile_content_ads_settings, as: 'mobileContentAdsSettings', class: Google::Apis::AdsensehostV4_1::AdUnit::MobileContentAdsSettings, decorator: Google::Apis::AdsensehostV4_1::AdUnit::MobileContentAdsSettings::Representation
property :name, as: 'name'
property :status, as: 'status'
end
# @private
class ContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :backup_option, as: 'backupOption', class: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::BackupOption, decorator: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::BackupOption::Representation
property :size, as: 'size'
property :type, as: 'type'
end
# @private
class BackupOption
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :type, as: 'type'
property :url, as: 'url'
end
end
end
# @private
class MobileContentAdsSettings
class Representation < Google::Apis::Core::JsonRepresentation
property :markup_language, as: 'markupLanguage'
property :scripting_language, as: 'scriptingLanguage'
property :size, as: 'size'
property :type, as: 'type'
end
end
end
# @private
class AdUnits
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::AdUnit, decorator: Google::Apis::AdsensehostV4_1::AdUnit::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AssociationSession
class Representation < Google::Apis::Core::JsonRepresentation
property :account_id, as: 'accountId'
property :id, as: 'id'
property :kind, as: 'kind'
collection :product_codes, as: 'productCodes'
property :redirect_url, as: 'redirectUrl'
property :status, as: 'status'
property :user_locale, as: 'userLocale'
property :website_locale, as: 'websiteLocale'
property :website_url, as: 'websiteUrl'
end
end
# @private
class CustomChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class CustomChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::CustomChannel, decorator: Google::Apis::AdsensehostV4_1::CustomChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Report
class Representation < Google::Apis::Core::JsonRepresentation
collection :averages, as: 'averages'
collection :headers, as: 'headers', class: Google::Apis::AdsensehostV4_1::Report::Header, decorator: Google::Apis::AdsensehostV4_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, as: 'totalMatchedRows'
collection :totals, as: 'totals'
collection :warnings, as: 'warnings'
end
# @private
class Header
class Representation < Google::Apis::Core::JsonRepresentation
property :currency, as: 'currency'
property :name, as: 'name'
property :type, as: 'type'
end
end
end
# @private
class UrlChannel
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :url_pattern, as: 'urlPattern'
end
end
# @private
class UrlChannels
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::UrlChannel, decorator: Google::Apis::AdsensehostV4_1::UrlChannel::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,49 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/analytics_v3/service.rb'
require 'google/apis/analytics_v3/classes.rb'
require 'google/apis/analytics_v3/representations.rb'
module Google
module Apis
# Google Analytics API
#
# View and manage your Google Analytics data
#
# @see https://developers.google.com/analytics/
module AnalyticsV3
VERSION = 'V3'
REVISION = '20150417'
# View and manage your Google Analytics data
AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics'
# Edit Google Analytics management entities
AUTH_ANALYTICS_EDIT = 'https://www.googleapis.com/auth/analytics.edit'
# Manage Google Analytics Account users by email address
AUTH_ANALYTICS_MANAGE_USERS = 'https://www.googleapis.com/auth/analytics.manage.users'
# View Google Analytics user permissions
AUTH_ANALYTICS_MANAGE_USERS_READONLY = 'https://www.googleapis.com/auth/analytics.manage.users.readonly'
# Create a new Google Analytics account along with its default property and view
AUTH_ANALYTICS_PROVISION = 'https://www.googleapis.com/auth/analytics.provision'
# View your Google Analytics data
AUTH_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/analytics.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/androidenterprise_v1/service.rb'
require 'google/apis/androidenterprise_v1/classes.rb'
require 'google/apis/androidenterprise_v1/representations.rb'
module Google
module Apis
# Google Play EMM API
#
# Allows MDMs/EMMs and enterprises to manage the deployment of apps to Android
# for Work users.
#
module AndroidenterpriseV1
VERSION = 'V1'
REVISION = '20150303'
# Manage corporate Android devices
AUTH_ANDROIDENTERPRISE = 'https://www.googleapis.com/auth/androidenterprise'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,431 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AndroidenterpriseV1
class AppRestrictionsSchema
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppRestrictionsSchemaRestriction
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppRestrictionsSchemaRestrictionRestrictionValue
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppVersion
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApprovalUrlInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Collection
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListCollectionViewersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListCollectionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Device
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DeviceState
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListDevicesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Enterprise
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EnterpriseAccount
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListEnterprisesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Entitlement
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListEntitlementsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GroupLicense
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListGroupLicenseUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListGroupLicensesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Install
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListInstallsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Permission
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Product
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ProductPermission
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ProductPermissions
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApproveProductRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GenerateProductApprovalUrlResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class User
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UserToken
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class AppRestrictionsSchema
class Representation < Google::Apis::Core::JsonRepresentation
collection :restrictions, as: 'restrictions', class: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction, decorator: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction::Representation
end
end
# @private
class AppRestrictionsSchemaRestriction
class Representation < Google::Apis::Core::JsonRepresentation
property :default_value, as: 'defaultValue', class: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue, decorator: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue::Representation
property :description, as: 'description'
collection :entry, as: 'entry'
collection :entry_value, as: 'entryValue'
property :key, as: 'key'
property :restriction_type, as: 'restrictionType'
property :title, as: 'title'
end
end
# @private
class AppRestrictionsSchemaRestrictionRestrictionValue
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value_bool, as: 'valueBool'
property :value_integer, as: 'valueInteger'
collection :value_multiselect, as: 'valueMultiselect'
property :value_string, as: 'valueString'
end
end
# @private
class AppVersion
class Representation < Google::Apis::Core::JsonRepresentation
property :version_code, as: 'versionCode'
property :version_string, as: 'versionString'
end
end
# @private
class ApprovalUrlInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :approval_url, as: 'approvalUrl'
property :kind, as: 'kind'
end
end
# @private
class Collection
class Representation < Google::Apis::Core::JsonRepresentation
property :collection_id, as: 'collectionId'
property :kind, as: 'kind'
property :name, as: 'name'
collection :product_id, as: 'productId'
property :visibility, as: 'visibility'
end
end
# @private
class ListCollectionViewersResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
end
end
# @private
class ListCollectionsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :collection, as: 'collection', class: Google::Apis::AndroidenterpriseV1::Collection, decorator: Google::Apis::AndroidenterpriseV1::Collection::Representation
property :kind, as: 'kind'
end
end
# @private
class Device
class Representation < Google::Apis::Core::JsonRepresentation
property :android_id, as: 'androidId'
property :kind, as: 'kind'
property :management_type, as: 'managementType'
end
end
# @private
class DeviceState
class Representation < Google::Apis::Core::JsonRepresentation
property :account_state, as: 'accountState'
property :kind, as: 'kind'
end
end
# @private
class ListDevicesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :device, as: 'device', class: Google::Apis::AndroidenterpriseV1::Device, decorator: Google::Apis::AndroidenterpriseV1::Device::Representation
property :kind, as: 'kind'
end
end
# @private
class Enterprise
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :primary_domain, as: 'primaryDomain'
end
end
# @private
class EnterpriseAccount
class Representation < Google::Apis::Core::JsonRepresentation
property :account_email, as: 'accountEmail'
property :kind, as: 'kind'
end
end
# @private
class ListEnterprisesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :enterprise, as: 'enterprise', class: Google::Apis::AndroidenterpriseV1::Enterprise, decorator: Google::Apis::AndroidenterpriseV1::Enterprise::Representation
property :kind, as: 'kind'
end
end
# @private
class Entitlement
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :product_id, as: 'productId'
property :reason, as: 'reason'
end
end
# @private
class ListEntitlementsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :entitlement, as: 'entitlement', class: Google::Apis::AndroidenterpriseV1::Entitlement, decorator: Google::Apis::AndroidenterpriseV1::Entitlement::Representation
property :kind, as: 'kind'
end
end
# @private
class GroupLicense
class Representation < Google::Apis::Core::JsonRepresentation
property :acquisition_kind, as: 'acquisitionKind'
property :approval, as: 'approval'
property :kind, as: 'kind'
property :num_provisioned, as: 'numProvisioned'
property :num_purchased, as: 'numPurchased'
property :product_id, as: 'productId'
end
end
# @private
class ListGroupLicenseUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
end
end
# @private
class ListGroupLicensesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :group_license, as: 'groupLicense', class: Google::Apis::AndroidenterpriseV1::GroupLicense, decorator: Google::Apis::AndroidenterpriseV1::GroupLicense::Representation
property :kind, as: 'kind'
end
end
# @private
class Install
class Representation < Google::Apis::Core::JsonRepresentation
property :install_state, as: 'installState'
property :kind, as: 'kind'
property :product_id, as: 'productId'
property :version_code, as: 'versionCode'
end
end
# @private
class ListInstallsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :install, as: 'install', class: Google::Apis::AndroidenterpriseV1::Install, decorator: Google::Apis::AndroidenterpriseV1::Install::Representation
property :kind, as: 'kind'
end
end
# @private
class Permission
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :kind, as: 'kind'
property :name, as: 'name'
property :permission_id, as: 'permissionId'
end
end
# @private
class Product
class Representation < Google::Apis::Core::JsonRepresentation
collection :app_version, as: 'appVersion', class: Google::Apis::AndroidenterpriseV1::AppVersion, decorator: Google::Apis::AndroidenterpriseV1::AppVersion::Representation
property :author_name, as: 'authorName'
property :details_url, as: 'detailsUrl'
property :distribution_channel, as: 'distributionChannel'
property :icon_url, as: 'iconUrl'
property :kind, as: 'kind'
property :product_id, as: 'productId'
property :requires_container_app, as: 'requiresContainerApp'
property :title, as: 'title'
property :work_details_url, as: 'workDetailsUrl'
end
end
# @private
class ProductPermission
class Representation < Google::Apis::Core::JsonRepresentation
property :permission_id, as: 'permissionId'
property :state, as: 'state'
end
end
# @private
class ProductPermissions
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :permission, as: 'permission', class: Google::Apis::AndroidenterpriseV1::ProductPermission, decorator: Google::Apis::AndroidenterpriseV1::ProductPermission::Representation
property :product_id, as: 'productId'
end
end
# @private
class ApproveProductRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :approval_url_info, as: 'approvalUrlInfo', class: Google::Apis::AndroidenterpriseV1::ApprovalUrlInfo, decorator: Google::Apis::AndroidenterpriseV1::ApprovalUrlInfo::Representation
end
end
# @private
class GenerateProductApprovalUrlResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
# @private
class User
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :primary_email, as: 'primaryEmail'
end
end
# @private
class UserToken
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :token, as: 'token'
property :user_id, as: 'userId'
end
end
# @private
class ListUsersResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/androidpublisher_v2/service.rb'
require 'google/apis/androidpublisher_v2/classes.rb'
require 'google/apis/androidpublisher_v2/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 AndroidpublisherV2
VERSION = 'V2'
REVISION = '20150316'
# View and manage your Google Play Developer account
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,630 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AndroidpublisherV2
class Apk
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApkBinary
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApkListing
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListApkListingsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApksAddExternallyHostedRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ApksAddExternallyHostedResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListApksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AppEdit
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Entitlement
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListEntitlementsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExpansionFile
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UploadExpansionFilesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExternallyHostedApk
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExternallyHostedApkUsesPermission
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ImagesDeleteAllResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UploadImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProduct
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductListing
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductsBatchRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductsBatchRequestEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductsBatchResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InAppProductsBatchResponseEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InsertInAppProductsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InsertInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UpdateInAppProductsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UpdateInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Listing
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListListingsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MonthDay
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PageInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Price
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ProductPurchase
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Season
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SubscriptionDeferralInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SubscriptionPurchase
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DeferSubscriptionPurchasesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DeferSubscriptionPurchasesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Testers
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TokenPagination
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Track
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTracksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Apk
class Representation < Google::Apis::Core::JsonRepresentation
property :binary, as: 'binary', class: Google::Apis::AndroidpublisherV2::ApkBinary, decorator: Google::Apis::AndroidpublisherV2::ApkBinary::Representation
property :version_code, as: 'versionCode'
end
end
# @private
class ApkBinary
class Representation < Google::Apis::Core::JsonRepresentation
property :sha1, as: 'sha1'
end
end
# @private
class ApkListing
class Representation < Google::Apis::Core::JsonRepresentation
property :language, as: 'language'
property :recent_changes, as: 'recentChanges'
end
end
# @private
class ListApkListingsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :listings, as: 'listings', class: Google::Apis::AndroidpublisherV2::ApkListing, decorator: Google::Apis::AndroidpublisherV2::ApkListing::Representation
end
end
# @private
class ApksAddExternallyHostedRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :externally_hosted_apk, as: 'externallyHostedApk', class: Google::Apis::AndroidpublisherV2::ExternallyHostedApk, decorator: Google::Apis::AndroidpublisherV2::ExternallyHostedApk::Representation
end
end
# @private
class ApksAddExternallyHostedResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :externally_hosted_apk, as: 'externallyHostedApk', class: Google::Apis::AndroidpublisherV2::ExternallyHostedApk, decorator: Google::Apis::AndroidpublisherV2::ExternallyHostedApk::Representation
end
end
# @private
class ListApksResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :apks, as: 'apks', class: Google::Apis::AndroidpublisherV2::Apk, decorator: Google::Apis::AndroidpublisherV2::Apk::Representation
property :kind, as: 'kind'
end
end
# @private
class AppDetails
class Representation < Google::Apis::Core::JsonRepresentation
property :contact_email, as: 'contactEmail'
property :contact_phone, as: 'contactPhone'
property :contact_website, as: 'contactWebsite'
property :default_language, as: 'defaultLanguage'
end
end
# @private
class AppEdit
class Representation < Google::Apis::Core::JsonRepresentation
property :expiry_time_seconds, as: 'expiryTimeSeconds'
property :id, as: 'id'
end
end
# @private
class Entitlement
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :product_id, as: 'productId'
property :product_type, as: 'productType'
property :token, as: 'token'
end
end
# @private
class ListEntitlementsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :page_info, as: 'pageInfo', class: Google::Apis::AndroidpublisherV2::PageInfo, decorator: Google::Apis::AndroidpublisherV2::PageInfo::Representation
collection :resources, as: 'resources', class: Google::Apis::AndroidpublisherV2::Entitlement, decorator: Google::Apis::AndroidpublisherV2::Entitlement::Representation
property :token_pagination, as: 'tokenPagination', class: Google::Apis::AndroidpublisherV2::TokenPagination, decorator: Google::Apis::AndroidpublisherV2::TokenPagination::Representation
end
end
# @private
class ExpansionFile
class Representation < Google::Apis::Core::JsonRepresentation
property :file_size, as: 'fileSize'
property :references_version, as: 'referencesVersion'
end
end
# @private
class UploadExpansionFilesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :expansion_file, as: 'expansionFile', class: Google::Apis::AndroidpublisherV2::ExpansionFile, decorator: Google::Apis::AndroidpublisherV2::ExpansionFile::Representation
end
end
# @private
class ExternallyHostedApk
class Representation < Google::Apis::Core::JsonRepresentation
property :application_label, as: 'applicationLabel'
collection :certificate_base64s, as: 'certificateBase64s'
property :externally_hosted_url, as: 'externallyHostedUrl'
property :file_sha1_base64, as: 'fileSha1Base64'
property :file_sha256_base64, as: 'fileSha256Base64'
property :file_size, as: 'fileSize'
property :icon_base64, as: 'iconBase64'
property :maximum_sdk, as: 'maximumSdk'
property :minimum_sdk, as: 'minimumSdk'
collection :native_codes, as: 'nativeCodes'
property :package_name, as: 'packageName'
collection :uses_features, as: 'usesFeatures'
collection :uses_permissions, as: 'usesPermissions', class: Google::Apis::AndroidpublisherV2::ExternallyHostedApkUsesPermission, decorator: Google::Apis::AndroidpublisherV2::ExternallyHostedApkUsesPermission::Representation
property :version_code, as: 'versionCode'
property :version_name, as: 'versionName'
end
end
# @private
class ExternallyHostedApkUsesPermission
class Representation < Google::Apis::Core::JsonRepresentation
property :max_sdk_version, as: 'maxSdkVersion'
property :name, as: 'name'
end
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :sha1, as: 'sha1'
property :url, as: 'url'
end
end
# @private
class ImagesDeleteAllResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :deleted, as: 'deleted', class: Google::Apis::AndroidpublisherV2::Image, decorator: Google::Apis::AndroidpublisherV2::Image::Representation
end
end
# @private
class ListImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :images, as: 'images', class: Google::Apis::AndroidpublisherV2::Image, decorator: Google::Apis::AndroidpublisherV2::Image::Representation
end
end
# @private
class UploadImagesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :image, as: 'image', class: Google::Apis::AndroidpublisherV2::Image, decorator: Google::Apis::AndroidpublisherV2::Image::Representation
end
end
# @private
class InAppProduct
class Representation < Google::Apis::Core::JsonRepresentation
property :default_language, as: 'defaultLanguage'
property :default_price, as: 'defaultPrice', class: Google::Apis::AndroidpublisherV2::Price, decorator: Google::Apis::AndroidpublisherV2::Price::Representation
hash :listings, as: 'listings', class: Google::Apis::AndroidpublisherV2::InAppProductListing, decorator: Google::Apis::AndroidpublisherV2::InAppProductListing::Representation
property :package_name, as: 'packageName'
hash :prices, as: 'prices', class: Google::Apis::AndroidpublisherV2::Price, decorator: Google::Apis::AndroidpublisherV2::Price::Representation
property :purchase_type, as: 'purchaseType'
property :season, as: 'season', class: Google::Apis::AndroidpublisherV2::Season, decorator: Google::Apis::AndroidpublisherV2::Season::Representation
property :sku, as: 'sku'
property :status, as: 'status'
property :subscription_period, as: 'subscriptionPeriod'
property :trial_period, as: 'trialPeriod'
end
end
# @private
class InAppProductListing
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :title, as: 'title'
end
end
# @private
class InAppProductsBatchRequest
class Representation < Google::Apis::Core::JsonRepresentation
collection :entrys, as: 'entrys', class: Google::Apis::AndroidpublisherV2::InAppProductsBatchRequestEntry, decorator: Google::Apis::AndroidpublisherV2::InAppProductsBatchRequestEntry::Representation
end
end
# @private
class InAppProductsBatchRequestEntry
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_id, as: 'batchId'
property :inappproductsinsertrequest, as: 'inappproductsinsertrequest', class: Google::Apis::AndroidpublisherV2::InsertInAppProductsRequest, decorator: Google::Apis::AndroidpublisherV2::InsertInAppProductsRequest::Representation
property :inappproductsupdaterequest, as: 'inappproductsupdaterequest', class: Google::Apis::AndroidpublisherV2::UpdateInAppProductsRequest, decorator: Google::Apis::AndroidpublisherV2::UpdateInAppProductsRequest::Representation
property :method_name, as: 'methodName'
end
end
# @private
class InAppProductsBatchResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :entrys, as: 'entrys', class: Google::Apis::AndroidpublisherV2::InAppProductsBatchResponseEntry, decorator: Google::Apis::AndroidpublisherV2::InAppProductsBatchResponseEntry::Representation
property :kind, as: 'kind'
end
end
# @private
class InAppProductsBatchResponseEntry
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_id, as: 'batchId'
property :inappproductsinsertresponse, as: 'inappproductsinsertresponse', class: Google::Apis::AndroidpublisherV2::InsertInAppProductsResponse, decorator: Google::Apis::AndroidpublisherV2::InsertInAppProductsResponse::Representation
property :inappproductsupdateresponse, as: 'inappproductsupdateresponse', class: Google::Apis::AndroidpublisherV2::UpdateInAppProductsResponse, decorator: Google::Apis::AndroidpublisherV2::UpdateInAppProductsResponse::Representation
end
end
# @private
class InsertInAppProductsRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
end
end
# @private
class InsertInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
end
end
# @private
class ListInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
property :kind, as: 'kind'
property :page_info, as: 'pageInfo', class: Google::Apis::AndroidpublisherV2::PageInfo, decorator: Google::Apis::AndroidpublisherV2::PageInfo::Representation
property :token_pagination, as: 'tokenPagination', class: Google::Apis::AndroidpublisherV2::TokenPagination, decorator: Google::Apis::AndroidpublisherV2::TokenPagination::Representation
end
end
# @private
class UpdateInAppProductsRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
end
end
# @private
class UpdateInAppProductsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :inappproduct, as: 'inappproduct', class: Google::Apis::AndroidpublisherV2::InAppProduct, decorator: Google::Apis::AndroidpublisherV2::InAppProduct::Representation
end
end
# @private
class Listing
class Representation < Google::Apis::Core::JsonRepresentation
property :full_description, as: 'fullDescription'
property :language, as: 'language'
property :short_description, as: 'shortDescription'
property :title, as: 'title'
property :video, as: 'video'
end
end
# @private
class ListListingsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :listings, as: 'listings', class: Google::Apis::AndroidpublisherV2::Listing, decorator: Google::Apis::AndroidpublisherV2::Listing::Representation
end
end
# @private
class MonthDay
class Representation < Google::Apis::Core::JsonRepresentation
property :day, as: 'day'
property :month, as: 'month'
end
end
# @private
class PageInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :result_per_page, as: 'resultPerPage'
property :start_index, as: 'startIndex'
property :total_results, as: 'totalResults'
end
end
# @private
class Price
class Representation < Google::Apis::Core::JsonRepresentation
property :currency, as: 'currency'
property :price_micros, as: 'priceMicros'
end
end
# @private
class ProductPurchase
class Representation < Google::Apis::Core::JsonRepresentation
property :consumption_state, as: 'consumptionState'
property :developer_payload, as: 'developerPayload'
property :kind, as: 'kind'
property :purchase_state, as: 'purchaseState'
property :purchase_time_millis, as: 'purchaseTimeMillis'
end
end
# @private
class Season
class Representation < Google::Apis::Core::JsonRepresentation
property :end, as: 'end', class: Google::Apis::AndroidpublisherV2::MonthDay, decorator: Google::Apis::AndroidpublisherV2::MonthDay::Representation
property :start, as: 'start', class: Google::Apis::AndroidpublisherV2::MonthDay, decorator: Google::Apis::AndroidpublisherV2::MonthDay::Representation
end
end
# @private
class SubscriptionDeferralInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :desired_expiry_time_millis, as: 'desiredExpiryTimeMillis'
property :expected_expiry_time_millis, as: 'expectedExpiryTimeMillis'
end
end
# @private
class SubscriptionPurchase
class Representation < Google::Apis::Core::JsonRepresentation
property :auto_renewing, as: 'autoRenewing'
property :expiry_time_millis, as: 'expiryTimeMillis'
property :kind, as: 'kind'
property :start_time_millis, as: 'startTimeMillis'
end
end
# @private
class DeferSubscriptionPurchasesRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :deferral_info, as: 'deferralInfo', class: Google::Apis::AndroidpublisherV2::SubscriptionDeferralInfo, decorator: Google::Apis::AndroidpublisherV2::SubscriptionDeferralInfo::Representation
end
end
# @private
class DeferSubscriptionPurchasesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :new_expiry_time_millis, as: 'newExpiryTimeMillis'
end
end
# @private
class Testers
class Representation < Google::Apis::Core::JsonRepresentation
collection :google_groups, as: 'googleGroups'
collection :google_plus_communities, as: 'googlePlusCommunities'
end
end
# @private
class TokenPagination
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
property :previous_page_token, as: 'previousPageToken'
end
end
# @private
class Track
class Representation < Google::Apis::Core::JsonRepresentation
property :track, as: 'track'
property :user_fraction, as: 'userFraction'
collection :version_codes, as: 'versionCodes'
end
end
# @private
class ListTracksResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :tracks, as: 'tracks', class: Google::Apis::AndroidpublisherV2::Track, decorator: Google::Apis::AndroidpublisherV2::Track::Representation
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/appsactivity_v1/service.rb'
require 'google/apis/appsactivity_v1/classes.rb'
require 'google/apis/appsactivity_v1/representations.rb'
module Google
module Apis
# Google Apps Activity API
#
# Provides a historical view of activity.
#
# @see https://developers.google.com/google-apps/activity/
module AppsactivityV1
VERSION = 'V1'
REVISION = '20150326'
# View the activity history of your Google Apps
AUTH_ACTIVITY = 'https://www.googleapis.com/auth/activity'
# View and manage the files in your Google Drive
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
# View and manage metadata of files in your Google Drive
AUTH_DRIVE_METADATA = 'https://www.googleapis.com/auth/drive.metadata'
# View metadata for files in your Google Drive
AUTH_DRIVE_METADATA_READONLY = 'https://www.googleapis.com/auth/drive.metadata.readonly'
# View the files in your Google Drive
AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly'
end
end
end

View File

@ -1,392 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppsactivityV1
# An Activity resource is a combined view of multiple events. An activity has a
# list of individual events and a combined view of the common fields among all
# events.
class Activity
include Google::Apis::Core::Hashable
# Represents the changes associated with an action taken by a user.
# Corresponds to the JSON property `combinedEvent`
# @return [Google::Apis::AppsactivityV1::Event]
attr_accessor :combined_event
# A list of all the Events that make up the Activity.
# Corresponds to the JSON property `singleEvents`
# @return [Array<Google::Apis::AppsactivityV1::Event>]
attr_accessor :single_events
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@combined_event = args[:combined_event] unless args[:combined_event].nil?
@single_events = args[:single_events] unless args[:single_events].nil?
end
end
# Represents the changes associated with an action taken by a user.
class Event
include Google::Apis::Core::Hashable
# Additional event types. Some events may have multiple types when multiple
# actions are part of a single event. For example, creating a document, renaming
# it, and sharing it may be part of a single file-creation event.
# Corresponds to the JSON property `additionalEventTypes`
# @return [Array<String>]
attr_accessor :additional_event_types
# The time at which the event occurred formatted as Unix time in milliseconds.
# Corresponds to the JSON property `eventTimeMillis`
# @return [String]
attr_accessor :event_time_millis
# Whether this event is caused by a user being deleted.
# Corresponds to the JSON property `fromUserDeletion`
# @return [Boolean]
attr_accessor :from_user_deletion
alias_method :from_user_deletion?, :from_user_deletion
# Contains information about changes in an object's parents as a result of a
# move type event.
# Corresponds to the JSON property `move`
# @return [Google::Apis::AppsactivityV1::Move]
attr_accessor :move
# Extra information for permissionChange type events, such as the user or group
# the new permission applies to.
# Corresponds to the JSON property `permissionChanges`
# @return [Array<Google::Apis::AppsactivityV1::PermissionChange>]
attr_accessor :permission_changes
# The main type of event that occurred.
# Corresponds to the JSON property `primaryEventType`
# @return [String]
attr_accessor :primary_event_type
# Contains information about a renametype event.
# Corresponds to the JSON property `rename`
# @return [Google::Apis::AppsactivityV1::Rename]
attr_accessor :rename
# Information about the object modified by the event.
# Corresponds to the JSON property `target`
# @return [Google::Apis::AppsactivityV1::Target]
attr_accessor :target
# A representation of a user.
# Corresponds to the JSON property `user`
# @return [Google::Apis::AppsactivityV1::User]
attr_accessor :user
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@additional_event_types = args[:additional_event_types] unless args[:additional_event_types].nil?
@event_time_millis = args[:event_time_millis] unless args[:event_time_millis].nil?
@from_user_deletion = args[:from_user_deletion] unless args[:from_user_deletion].nil?
@move = args[:move] unless args[:move].nil?
@permission_changes = args[:permission_changes] unless args[:permission_changes].nil?
@primary_event_type = args[:primary_event_type] unless args[:primary_event_type].nil?
@rename = args[:rename] unless args[:rename].nil?
@target = args[:target] unless args[:target].nil?
@user = args[:user] unless args[:user].nil?
end
end
# The response from the list request. Contains a list of activities and a token
# to retrieve the next page of results.
class ListActivitiesResponse
include Google::Apis::Core::Hashable
# List of activities.
# Corresponds to the JSON property `activities`
# @return [Array<Google::Apis::AppsactivityV1::Activity>]
attr_accessor :activities
# Token for 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)
@activities = args[:activities] unless args[:activities].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# Contains information about changes in an object's parents as a result of a
# move type event.
class Move
include Google::Apis::Core::Hashable
# The added parent(s).
# Corresponds to the JSON property `addedParents`
# @return [Array<Google::Apis::AppsactivityV1::Parent>]
attr_accessor :added_parents
# The removed parent(s).
# Corresponds to the JSON property `removedParents`
# @return [Array<Google::Apis::AppsactivityV1::Parent>]
attr_accessor :removed_parents
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@added_parents = args[:added_parents] unless args[:added_parents].nil?
@removed_parents = args[:removed_parents] unless args[:removed_parents].nil?
end
end
# Contains information about a parent object. For example, a folder in Drive is
# a parent for all files within it.
class Parent
include Google::Apis::Core::Hashable
# The parent's ID.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Whether this is the root folder.
# Corresponds to the JSON property `isRoot`
# @return [Boolean]
attr_accessor :is_root
alias_method :is_root?, :is_root
# The parent's title.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@is_root = args[:is_root] unless args[:is_root].nil?
@title = args[:title] unless args[:title].nil?
end
end
# Contains information about the permissions and type of access allowed with
# regards to a Google Drive object. This is a subset of the fields contained in
# a corresponding Drive Permissions object.
class Permission
include Google::Apis::Core::Hashable
# The name of the user or group the permission applies to.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The ID for this permission. Corresponds to the Drive API's permission ID
# returned as part of the Drive Permissions resource.
# Corresponds to the JSON property `permissionId`
# @return [String]
attr_accessor :permission_id
# Indicates the Google Drive permissions role. The role determines a user's
# ability to read, write, or comment on the file.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
# Indicates how widely permissions are granted.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# A representation of a user.
# Corresponds to the JSON property `user`
# @return [Google::Apis::AppsactivityV1::User]
attr_accessor :user
# Whether the permission requires a link to the file.
# Corresponds to the JSON property `withLink`
# @return [Boolean]
attr_accessor :with_link
alias_method :with_link?, :with_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@permission_id = args[:permission_id] unless args[:permission_id].nil?
@role = args[:role] unless args[:role].nil?
@type = args[:type] unless args[:type].nil?
@user = args[:user] unless args[:user].nil?
@with_link = args[:with_link] unless args[:with_link].nil?
end
end
# Contains information about a Drive object's permissions that changed as a
# result of a permissionChange type event.
class PermissionChange
include Google::Apis::Core::Hashable
# Lists all Permission objects added.
# Corresponds to the JSON property `addedPermissions`
# @return [Array<Google::Apis::AppsactivityV1::Permission>]
attr_accessor :added_permissions
# Lists all Permission objects removed.
# Corresponds to the JSON property `removedPermissions`
# @return [Array<Google::Apis::AppsactivityV1::Permission>]
attr_accessor :removed_permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@added_permissions = args[:added_permissions] unless args[:added_permissions].nil?
@removed_permissions = args[:removed_permissions] unless args[:removed_permissions].nil?
end
end
# Photo information for a user.
class Photo
include Google::Apis::Core::Hashable
# The URL of the photo.
# 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] unless args[:url].nil?
end
end
# Contains information about a renametype event.
class Rename
include Google::Apis::Core::Hashable
# The new title.
# Corresponds to the JSON property `newTitle`
# @return [String]
attr_accessor :new_title
# The old title.
# Corresponds to the JSON property `oldTitle`
# @return [String]
attr_accessor :old_title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@new_title = args[:new_title] unless args[:new_title].nil?
@old_title = args[:old_title] unless args[:old_title].nil?
end
end
# Information about the object modified by the event.
class Target
include Google::Apis::Core::Hashable
# The ID of the target. For example, in Google Drive, this is the file or folder
# ID.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# The MIME type of the target.
# Corresponds to the JSON property `mimeType`
# @return [String]
attr_accessor :mime_type
# The name of the target. For example, in Google Drive, this is the title of the
# file.
# 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] unless args[:id].nil?
@mime_type = args[:mime_type] unless args[:mime_type].nil?
@name = args[:name] unless args[:name].nil?
end
end
# A representation of a user.
class User
include Google::Apis::Core::Hashable
# The displayable name of the user.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Photo information for a user.
# Corresponds to the JSON property `photo`
# @return [Google::Apis::AppsactivityV1::Photo]
attr_accessor :photo
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@photo = args[:photo] unless args[:photo].nil?
end
end
end
end
end

View File

@ -1,184 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppsactivityV1
class Activity
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Event
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListActivitiesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Move
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Parent
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Permission
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PermissionChange
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Photo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Rename
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Target
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class User
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Activity
class Representation < Google::Apis::Core::JsonRepresentation
property :combined_event, as: 'combinedEvent', class: Google::Apis::AppsactivityV1::Event, decorator: Google::Apis::AppsactivityV1::Event::Representation
collection :single_events, as: 'singleEvents', class: Google::Apis::AppsactivityV1::Event, decorator: Google::Apis::AppsactivityV1::Event::Representation
end
end
# @private
class Event
class Representation < Google::Apis::Core::JsonRepresentation
collection :additional_event_types, as: 'additionalEventTypes'
property :event_time_millis, as: 'eventTimeMillis'
property :from_user_deletion, as: 'fromUserDeletion'
property :move, as: 'move', class: Google::Apis::AppsactivityV1::Move, decorator: Google::Apis::AppsactivityV1::Move::Representation
collection :permission_changes, as: 'permissionChanges', class: Google::Apis::AppsactivityV1::PermissionChange, decorator: Google::Apis::AppsactivityV1::PermissionChange::Representation
property :primary_event_type, as: 'primaryEventType'
property :rename, as: 'rename', class: Google::Apis::AppsactivityV1::Rename, decorator: Google::Apis::AppsactivityV1::Rename::Representation
property :target, as: 'target', class: Google::Apis::AppsactivityV1::Target, decorator: Google::Apis::AppsactivityV1::Target::Representation
property :user, as: 'user', class: Google::Apis::AppsactivityV1::User, decorator: Google::Apis::AppsactivityV1::User::Representation
end
end
# @private
class ListActivitiesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :activities, as: 'activities', class: Google::Apis::AppsactivityV1::Activity, decorator: Google::Apis::AppsactivityV1::Activity::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Move
class Representation < Google::Apis::Core::JsonRepresentation
collection :added_parents, as: 'addedParents', class: Google::Apis::AppsactivityV1::Parent, decorator: Google::Apis::AppsactivityV1::Parent::Representation
collection :removed_parents, as: 'removedParents', class: Google::Apis::AppsactivityV1::Parent, decorator: Google::Apis::AppsactivityV1::Parent::Representation
end
end
# @private
class Parent
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :is_root, as: 'isRoot'
property :title, as: 'title'
end
end
# @private
class Permission
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :permission_id, as: 'permissionId'
property :role, as: 'role'
property :type, as: 'type'
property :user, as: 'user', class: Google::Apis::AppsactivityV1::User, decorator: Google::Apis::AppsactivityV1::User::Representation
property :with_link, as: 'withLink'
end
end
# @private
class PermissionChange
class Representation < Google::Apis::Core::JsonRepresentation
collection :added_permissions, as: 'addedPermissions', class: Google::Apis::AppsactivityV1::Permission, decorator: Google::Apis::AppsactivityV1::Permission::Representation
collection :removed_permissions, as: 'removedPermissions', class: Google::Apis::AppsactivityV1::Permission, decorator: Google::Apis::AppsactivityV1::Permission::Representation
end
end
# @private
class Photo
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
# @private
class Rename
class Representation < Google::Apis::Core::JsonRepresentation
property :new_title, as: 'newTitle'
property :old_title, as: 'oldTitle'
end
end
# @private
class Target
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :mime_type, as: 'mimeType'
property :name, as: 'name'
end
end
# @private
class User
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :photo, as: 'photo', class: Google::Apis::AppsactivityV1::Photo, decorator: Google::Apis::AppsactivityV1::Photo::Representation
end
end
end
end
end

View File

@ -1,129 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppsactivityV1
# Google Apps Activity API
#
# Provides a historical view of activity.
#
# @example
# require 'google/apis/appsactivity_v1'
#
# Appsactivity = Google::Apis::AppsactivityV1 # Alias the module
# service = Appsactivity::AppsactivityService.new
#
# @see https://developers.google.com/google-apps/activity/
class AppsactivityService < 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/', 'appsactivity/v1/')
end
# Returns a list of activities visible to the current logged in user. Visible
# activities are determined by the visiblity settings of the object that was
# acted on, e.g. Drive files a user can see. An activity is a record of past
# events. Multiple events may be merged if they are similar. A request is scoped
# to activities from a given Google service using the source parameter.
# @param [String] drive_ancestor_id
# Identifies the Drive folder containing the items for which to return
# activities.
# @param [String] drive_file_id
# Identifies the Drive item to return activities for.
# @param [String] grouping_strategy
# Indicates the strategy to use when grouping singleEvents items in the
# associated combinedEvent object.
# @param [Fixnum] page_size
# The maximum number of events to return on a page. The response includes a
# continuation token if there are more events.
# @param [String] page_token
# A token to retrieve a specific page of results.
# @param [String] source
# The Google service from which to return activities. Possible values of source
# are:
# - drive.google.com
# @param [String] user_id
# Indicates the user to return activity for. Use the special value me to
# indicate the currently 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::AppsactivityV1::ListActivitiesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppsactivityV1::ListActivitiesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_activities(drive_ancestor_id: nil, drive_file_id: nil, grouping_strategy: nil, page_size: nil, page_token: nil, source: nil, user_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'activities'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AppsactivityV1::ListActivitiesResponse::Representation
command.response_class = Google::Apis::AppsactivityV1::ListActivitiesResponse
command.query['drive.ancestorId'] = drive_ancestor_id unless drive_ancestor_id.nil?
command.query['drive.fileId'] = drive_file_id unless drive_file_id.nil?
command.query['groupingStrategy'] = grouping_strategy unless grouping_strategy.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['source'] = source unless source.nil?
command.query['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

View File

@ -1,34 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/appstate_v1/service.rb'
require 'google/apis/appstate_v1/classes.rb'
require 'google/apis/appstate_v1/representations.rb'
module Google
module Apis
# Google App State API
#
# The Google App State API.
#
# @see https://developers.google.com/games/services/web/api/states
module AppstateV1
VERSION = 'V1'
REVISION = '20150527'
# View and manage your data for this application
AUTH_APPSTATE = 'https://www.googleapis.com/auth/appstate'
end
end
end

View File

@ -1,154 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppstateV1
# This is a JSON template for an app state resource.
class GetResponse
include Google::Apis::Core::Hashable
# The current app state version.
# Corresponds to the JSON property `currentStateVersion`
# @return [String]
attr_accessor :current_state_version
# The requested data.
# Corresponds to the JSON property `data`
# @return [String]
attr_accessor :data
# Uniquely identifies the type of this resource. Value is always the fixed
# string appstate#getResponse.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The key for the data.
# Corresponds to the JSON property `stateKey`
# @return [Fixnum]
attr_accessor :state_key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_state_version = args[:current_state_version] unless args[:current_state_version].nil?
@data = args[:data] unless args[:data].nil?
@kind = args[:kind] unless args[:kind].nil?
@state_key = args[:state_key] unless args[:state_key].nil?
end
end
# This is a JSON template to convert a list-response for app state.
class ListResponse
include Google::Apis::Core::Hashable
# The app state data.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AppstateV1::GetResponse>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string appstate#listResponse.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The maximum number of keys allowed for this user.
# Corresponds to the JSON property `maximumKeyCount`
# @return [Fixnum]
attr_accessor :maximum_key_count
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@maximum_key_count = args[:maximum_key_count] unless args[:maximum_key_count].nil?
end
end
# This is a JSON template for a requests which update app state
class UpdateRequest
include Google::Apis::Core::Hashable
# The new app state data that your application is trying to update with.
# Corresponds to the JSON property `data`
# @return [String]
attr_accessor :data
# Uniquely identifies the type of this resource. Value is always the fixed
# string appstate#updateRequest.
# 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)
@data = args[:data] unless args[:data].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# This is a JSON template for an app state write result.
class WriteResult
include Google::Apis::Core::Hashable
# The version of the data for this key on the server.
# Corresponds to the JSON property `currentStateVersion`
# @return [String]
attr_accessor :current_state_version
# Uniquely identifies the type of this resource. Value is always the fixed
# string appstate#writeResult.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The written key.
# Corresponds to the JSON property `stateKey`
# @return [Fixnum]
attr_accessor :state_key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_state_version = args[:current_state_version] unless args[:current_state_version].nil?
@kind = args[:kind] unless args[:kind].nil?
@state_key = args[:state_key] unless args[:state_key].nil?
end
end
end
end
end

View File

@ -1,79 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppstateV1
class GetResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class UpdateRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class WriteResult
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class GetResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :current_state_version, as: 'currentStateVersion'
property :data, as: 'data'
property :kind, as: 'kind'
property :state_key, as: 'stateKey'
end
end
# @private
class ListResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AppstateV1::GetResponse, decorator: Google::Apis::AppstateV1::GetResponse::Representation
property :kind, as: 'kind'
property :maximum_key_count, as: 'maximumKeyCount'
end
end
# @private
class UpdateRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :data, as: 'data'
property :kind, as: 'kind'
end
end
# @private
class WriteResult
class Representation < Google::Apis::Core::JsonRepresentation
property :current_state_version, as: 'currentStateVersion'
property :kind, as: 'kind'
property :state_key, as: 'stateKey'
end
end
end
end
end

View File

@ -1,265 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppstateV1
# Google App State API
#
# The Google App State API.
#
# @example
# require 'google/apis/appstate_v1'
#
# Appstate = Google::Apis::AppstateV1 # Alias the module
# service = Appstate::AppStateService.new
#
# @see https://developers.google.com/games/services/web/api/states
class AppStateService < 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/', 'appstate/v1/')
end
# Clears (sets to empty) the data for the passed key if and only if the passed
# version matches the currently stored version. This method results in a
# conflict error on version mismatch.
# @param [Fixnum] state_key
# The key for the data to be retrieved.
# @param [String] current_data_version
# The version of the data to be cleared. Version strings are returned by the
# server.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AppstateV1::WriteResult] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppstateV1::WriteResult]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def clear_state(state_key, current_data_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states/{stateKey}/clear'
command = make_simple_command(:post, path, options)
command.response_representation = Google::Apis::AppstateV1::WriteResult::Representation
command.response_class = Google::Apis::AppstateV1::WriteResult
command.params['stateKey'] = state_key unless state_key.nil?
command.query['currentDataVersion'] = current_data_version unless current_data_version.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 a key and the data associated with it. The key is removed and no
# longer counts against the key quota. Note that since this method is not safe
# in the face of concurrent modifications, it should only be used for
# development and testing purposes. Invoking this method in shipping code can
# result in data loss and data corruption.
# @param [Fixnum] state_key
# The key for the data to be retrieved.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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_state(state_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states/{stateKey}'
command = make_simple_command(:delete, path, options)
command.params['stateKey'] = state_key unless state_key.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 data corresponding to the passed key. If the key does not exist
# on the server, an HTTP 404 will be returned.
# @param [Fixnum] state_key
# The key for the data to be retrieved.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AppstateV1::GetResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppstateV1::GetResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_state(state_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states/{stateKey}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AppstateV1::GetResponse::Representation
command.response_class = Google::Apis::AppstateV1::GetResponse
command.params['stateKey'] = state_key unless state_key.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 the states keys, and optionally the state data.
# @param [Boolean] include_data
# Whether to include the full data in addition to the version number
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AppstateV1::ListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppstateV1::ListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_states(include_data: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AppstateV1::ListResponse::Representation
command.response_class = Google::Apis::AppstateV1::ListResponse
command.query['includeData'] = include_data unless include_data.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 the data associated with the input key if and only if the passed
# version matches the currently stored version. This method is safe in the face
# of concurrent writes. Maximum per-key size is 128KB.
# @param [Fixnum] state_key
# The key for the data to be retrieved.
# @param [Google::Apis::AppstateV1::UpdateRequest] update_request_object
# @param [String] current_state_version
# The version of the app state your application is attempting to update. If this
# does not match the current version, this method will return a conflict error.
# If there is no data stored on the server for this key, the update will succeed
# irrespective of the value of this 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 [Google::Apis::AppstateV1::WriteResult] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AppstateV1::WriteResult]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(state_key, update_request_object = nil, current_state_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'states/{stateKey}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::AppstateV1::UpdateRequest::Representation
command.request_object = update_request_object
command.response_representation = Google::Apis::AppstateV1::WriteResult::Representation
command.response_class = Google::Apis::AppstateV1::WriteResult
command.params['stateKey'] = state_key unless state_key.nil?
command.query['currentStateVersion'] = current_state_version unless current_state_version.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

View File

@ -1,38 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/autoscaler_v1beta2/service.rb'
require 'google/apis/autoscaler_v1beta2/classes.rb'
require 'google/apis/autoscaler_v1beta2/representations.rb'
module Google
module Apis
# Google Compute Engine Autoscaler API
#
# The Google Compute Engine Autoscaler API provides autoscaling for groups of
# Cloud VMs.
#
# @see http://developers.google.com/compute/docs/autoscaler
module AutoscalerV1beta2
VERSION = 'V1beta2'
REVISION = '20150213'
# 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'
end
end
end

View File

@ -1,747 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AutoscalerV1beta2
# Cloud Autoscaler resource.
class Autoscaler
include Google::Apis::Core::Hashable
# Cloud Autoscaler policy.
# Corresponds to the JSON property `autoscalingPolicy`
# @return [Google::Apis::AutoscalerV1beta2::AutoscalingPolicy]
attr_accessor :autoscaling_policy
# [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.
# 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 [String]
attr_accessor :id
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of the Autoscaler resource. Must be unique per project and zone.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# [Output Only] A self-link to the Autoscaler configuration resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# URL to the entity which will be autoscaled. Currently the only supported value
# is ReplicaPool?s URL. Note: it is illegal to specify multiple Autoscalers for
# the same target.
# Corresponds to the JSON property `target`
# @return [String]
attr_accessor :target
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@autoscaling_policy = args[:autoscaling_policy] unless args[:autoscaling_policy].nil?
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@description = args[:description] unless args[:description].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@target = args[:target] unless args[:target].nil?
end
end
#
class ListAutoscalerResponse
include Google::Apis::Core::Hashable
# Autoscaler resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AutoscalerV1beta2::Autoscaler>]
attr_accessor :items
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output only] A token used to continue a truncated list request.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# Cloud Autoscaler policy.
class AutoscalingPolicy
include Google::Apis::Core::Hashable
# The number of seconds that the Autoscaler should wait between two succeeding
# changes to the number of virtual machines. You should define an interval that
# is at least as long as the initialization time of a virtual machine and the
# time it may take for replica pool to create the virtual machine. The default
# is 60 seconds.
# Corresponds to the JSON property `coolDownPeriodSec`
# @return [Fixnum]
attr_accessor :cool_down_period_sec
# CPU utilization policy.
# Corresponds to the JSON property `cpuUtilization`
# @return [Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCpuUtilization]
attr_accessor :cpu_utilization
# Configuration parameters of autoscaling based on custom metric.
# Corresponds to the JSON property `customMetricUtilizations`
# @return [Array<Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization>]
attr_accessor :custom_metric_utilizations
# Load balancing utilization policy.
# Corresponds to the JSON property `loadBalancingUtilization`
# @return [Google::Apis::AutoscalerV1beta2::AutoscalingPolicyLoadBalancingUtilization]
attr_accessor :load_balancing_utilization
# The maximum number of replicas that the Autoscaler can scale up to.
# Corresponds to the JSON property `maxNumReplicas`
# @return [Fixnum]
attr_accessor :max_num_replicas
# The minimum number of replicas that the Autoscaler can scale down to.
# Corresponds to the JSON property `minNumReplicas`
# @return [Fixnum]
attr_accessor :min_num_replicas
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cool_down_period_sec = args[:cool_down_period_sec] unless args[:cool_down_period_sec].nil?
@cpu_utilization = args[:cpu_utilization] unless args[:cpu_utilization].nil?
@custom_metric_utilizations = args[:custom_metric_utilizations] unless args[:custom_metric_utilizations].nil?
@load_balancing_utilization = args[:load_balancing_utilization] unless args[:load_balancing_utilization].nil?
@max_num_replicas = args[:max_num_replicas] unless args[:max_num_replicas].nil?
@min_num_replicas = args[:min_num_replicas] unless args[:min_num_replicas].nil?
end
end
# CPU utilization policy.
class AutoscalingPolicyCpuUtilization
include Google::Apis::Core::Hashable
# The target utilization that the Autoscaler should maintain. It is represented
# as a fraction of used cores. For example: 6 cores used in 8-core VM are
# represented here as 0.75. Must be a float value between (0, 1]. If not defined,
# the default is 0.8.
# Corresponds to the JSON property `utilizationTarget`
# @return [Float]
attr_accessor :utilization_target
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@utilization_target = args[:utilization_target] unless args[:utilization_target].nil?
end
end
# Custom utilization metric policy.
class AutoscalingPolicyCustomMetricUtilization
include Google::Apis::Core::Hashable
# Identifier of the metric. It should be a Cloud Monitoring metric. The metric
# can not have negative values. The metric should be an utilization metric (
# increasing number of VMs handling requests x times should reduce average value
# of the metric roughly x times). For example you could use: compute.googleapis.
# com/instance/network/received_bytes_count.
# Corresponds to the JSON property `metric`
# @return [String]
attr_accessor :metric
# Target value of the metric which Autoscaler should maintain. Must be a
# positive value.
# Corresponds to the JSON property `utilizationTarget`
# @return [Float]
attr_accessor :utilization_target
# Defines type in which utilization_target is expressed.
# Corresponds to the JSON property `utilizationTargetType`
# @return [String]
attr_accessor :utilization_target_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metric = args[:metric] unless args[:metric].nil?
@utilization_target = args[:utilization_target] unless args[:utilization_target].nil?
@utilization_target_type = args[:utilization_target_type] unless args[:utilization_target_type].nil?
end
end
# Load balancing utilization policy.
class AutoscalingPolicyLoadBalancingUtilization
include Google::Apis::Core::Hashable
# Fraction of backend capacity utilization (set in HTTP load balancing
# configuration) that Autoscaler should maintain. Must be a positive float value.
# If not defined, the default is 0.8. For example if your maxRatePerInstance
# capacity (in HTTP Load Balancing configuration) is set at 10 and you would
# like to keep number of instances such that each instance receives 7 QPS on
# average, set this to 0.7.
# Corresponds to the JSON property `utilizationTarget`
# @return [Float]
attr_accessor :utilization_target
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@utilization_target = args[:utilization_target] unless args[:utilization_target].nil?
end
end
#
class DeprecationStatus
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `deleted`
# @return [String]
attr_accessor :deleted
#
# Corresponds to the JSON property `deprecated`
# @return [String]
attr_accessor :deprecated
#
# Corresponds to the JSON property `obsolete`
# @return [String]
attr_accessor :obsolete
#
# Corresponds to the JSON property `replacement`
# @return [String]
attr_accessor :replacement
#
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@deleted = args[:deleted] unless args[:deleted].nil?
@deprecated = args[:deprecated] unless args[:deprecated].nil?
@obsolete = args[:obsolete] unless args[:obsolete].nil?
@replacement = args[:replacement] unless args[:replacement].nil?
@state = args[:state] unless args[:state].nil?
end
end
#
class Operation
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `clientOperationId`
# @return [String]
attr_accessor :client_operation_id
#
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
#
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
#
# Corresponds to the JSON property `error`
# @return [Google::Apis::AutoscalerV1beta2::Operation::Error]
attr_accessor :error
#
# Corresponds to the JSON property `httpErrorMessage`
# @return [String]
attr_accessor :http_error_message
#
# Corresponds to the JSON property `httpErrorStatusCode`
# @return [Fixnum]
attr_accessor :http_error_status_code
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# 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
#
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
#
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
#
# Corresponds to the JSON property `progress`
# @return [Fixnum]
attr_accessor :progress
#
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
#
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
#
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
#
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
#
# Corresponds to the JSON property `statusMessage`
# @return [String]
attr_accessor :status_message
#
# Corresponds to the JSON property `targetId`
# @return [String]
attr_accessor :target_id
#
# Corresponds to the JSON property `targetLink`
# @return [String]
attr_accessor :target_link
#
# Corresponds to the JSON property `user`
# @return [String]
attr_accessor :user
#
# Corresponds to the JSON property `warnings`
# @return [Array<Google::Apis::AutoscalerV1beta2::Operation::Warning>]
attr_accessor :warnings
#
# 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] unless args[:client_operation_id].nil?
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@end_time = args[:end_time] unless args[:end_time].nil?
@error = args[:error] unless args[:error].nil?
@http_error_message = args[:http_error_message] unless args[:http_error_message].nil?
@http_error_status_code = args[:http_error_status_code] unless args[:http_error_status_code].nil?
@id = args[:id] unless args[:id].nil?
@insert_time = args[:insert_time] unless args[:insert_time].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@operation_type = args[:operation_type] unless args[:operation_type].nil?
@progress = args[:progress] unless args[:progress].nil?
@region = args[:region] unless args[:region].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@start_time = args[:start_time] unless args[:start_time].nil?
@status = args[:status] unless args[:status].nil?
@status_message = args[:status_message] unless args[:status_message].nil?
@target_id = args[:target_id] unless args[:target_id].nil?
@target_link = args[:target_link] unless args[:target_link].nil?
@user = args[:user] unless args[:user].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
@zone = args[:zone] unless args[:zone].nil?
end
#
class Error
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `errors`
# @return [Array<Google::Apis::AutoscalerV1beta2::Operation::Error::Error>]
attr_accessor :errors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@errors = args[:errors] unless args[:errors].nil?
end
#
class Error
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
#
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
#
# 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] unless args[:code].nil?
@location = args[:location] unless args[:location].nil?
@message = args[:message] unless args[:message].nil?
end
end
end
#
class Warning
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
#
# Corresponds to the JSON property `data`
# @return [Array<Google::Apis::AutoscalerV1beta2::Operation::Warning::Datum>]
attr_accessor :data
#
# 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] unless args[:code].nil?
@data = args[:data] unless args[:data].nil?
@message = args[:message] unless args[:message].nil?
end
#
class Datum
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :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] unless args[:key].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
end
#
class OperationList
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AutoscalerV1beta2::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
#
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
#
# 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] unless args[:id].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
end
end
#
class Zone
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
#
# Corresponds to the JSON property `deprecated`
# @return [Google::Apis::AutoscalerV1beta2::DeprecationStatus]
attr_accessor :deprecated
#
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] Type of the resource. Always kind#zone for zones.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `maintenanceWindows`
# @return [Array<Google::Apis::AutoscalerV1beta2::Zone::MaintenanceWindow>]
attr_accessor :maintenance_windows
#
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
#
# 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
#
# 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)
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@deprecated = args[:deprecated] unless args[:deprecated].nil?
@description = args[:description] unless args[:description].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@maintenance_windows = args[:maintenance_windows] unless args[:maintenance_windows].nil?
@name = args[:name] unless args[:name].nil?
@region = args[:region] unless args[:region].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@status = args[:status] unless args[:status].nil?
end
#
class MaintenanceWindow
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `beginTime`
# @return [String]
attr_accessor :begin_time
#
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
#
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
#
# 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)
@begin_time = args[:begin_time] unless args[:begin_time].nil?
@description = args[:description] unless args[:description].nil?
@end_time = args[:end_time] unless args[:end_time].nil?
@name = args[:name] unless args[:name].nil?
end
end
end
#
class ZoneList
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::AutoscalerV1beta2::Zone>]
attr_accessor :items
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Server defined URL for this resource (output only).
# 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] unless args[:id].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
end
end
end
end
end

View File

@ -1,281 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AutoscalerV1beta2
class Autoscaler
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListAutoscalerResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AutoscalingPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AutoscalingPolicyCpuUtilization
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AutoscalingPolicyCustomMetricUtilization
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AutoscalingPolicyLoadBalancingUtilization
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DeprecationStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
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
end
end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
end
class OperationList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Zone
class Representation < Google::Apis::Core::JsonRepresentation; end
class MaintenanceWindow
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ZoneList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Autoscaler
class Representation < Google::Apis::Core::JsonRepresentation
property :autoscaling_policy, as: 'autoscalingPolicy', class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicy, decorator: Google::Apis::AutoscalerV1beta2::AutoscalingPolicy::Representation
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :self_link, as: 'selfLink'
property :target, as: 'target'
end
end
# @private
class ListAutoscalerResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::AutoscalerV1beta2::Autoscaler, decorator: Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class AutoscalingPolicy
class Representation < Google::Apis::Core::JsonRepresentation
property :cool_down_period_sec, as: 'coolDownPeriodSec'
property :cpu_utilization, as: 'cpuUtilization', class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCpuUtilization, decorator: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCpuUtilization::Representation
collection :custom_metric_utilizations, as: 'customMetricUtilizations', class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization, decorator: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCustomMetricUtilization::Representation
property :load_balancing_utilization, as: 'loadBalancingUtilization', class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyLoadBalancingUtilization, decorator: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyLoadBalancingUtilization::Representation
property :max_num_replicas, as: 'maxNumReplicas'
property :min_num_replicas, as: 'minNumReplicas'
end
end
# @private
class AutoscalingPolicyCpuUtilization
class Representation < Google::Apis::Core::JsonRepresentation
property :utilization_target, as: 'utilizationTarget'
end
end
# @private
class AutoscalingPolicyCustomMetricUtilization
class Representation < Google::Apis::Core::JsonRepresentation
property :metric, as: 'metric'
property :utilization_target, as: 'utilizationTarget'
property :utilization_target_type, as: 'utilizationTargetType'
end
end
# @private
class AutoscalingPolicyLoadBalancingUtilization
class Representation < Google::Apis::Core::JsonRepresentation
property :utilization_target, as: 'utilizationTarget'
end
end
# @private
class DeprecationStatus
class Representation < Google::Apis::Core::JsonRepresentation
property :deleted, as: 'deleted'
property :deprecated, as: 'deprecated'
property :obsolete, as: 'obsolete'
property :replacement, as: 'replacement'
property :state, as: 'state'
end
end
# @private
class Operation
class Representation < Google::Apis::Core::JsonRepresentation
property :client_operation_id, as: 'clientOperationId'
property :creation_timestamp, as: 'creationTimestamp'
property :end_time, as: 'endTime'
property :error, as: 'error', class: Google::Apis::AutoscalerV1beta2::Operation::Error, decorator: Google::Apis::AutoscalerV1beta2::Operation::Error::Representation
property :http_error_message, as: 'httpErrorMessage'
property :http_error_status_code, as: 'httpErrorStatusCode'
property :id, 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, as: 'targetId'
property :target_link, as: 'targetLink'
property :user, as: 'user'
collection :warnings, as: 'warnings', class: Google::Apis::AutoscalerV1beta2::Operation::Warning, decorator: Google::Apis::AutoscalerV1beta2::Operation::Warning::Representation
property :zone, as: 'zone'
end
# @private
class Error
class Representation < Google::Apis::Core::JsonRepresentation
collection :errors, as: 'errors', class: Google::Apis::AutoscalerV1beta2::Operation::Error::Error, decorator: Google::Apis::AutoscalerV1beta2::Operation::Error::Error::Representation
end
# @private
class Error
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :location, as: 'location'
property :message, as: 'message'
end
end
end
# @private
class Warning
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::AutoscalerV1beta2::Operation::Warning::Datum, decorator: Google::Apis::AutoscalerV1beta2::Operation::Warning::Datum::Representation
property :message, as: 'message'
end
# @private
class Datum
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
# @private
class OperationList
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::AutoscalerV1beta2::Operation, decorator: Google::Apis::AutoscalerV1beta2::Operation::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
# @private
class Zone
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_timestamp, as: 'creationTimestamp'
property :deprecated, as: 'deprecated', class: Google::Apis::AutoscalerV1beta2::DeprecationStatus, decorator: Google::Apis::AutoscalerV1beta2::DeprecationStatus::Representation
property :description, as: 'description'
property :id, as: 'id'
property :kind, as: 'kind'
collection :maintenance_windows, as: 'maintenanceWindows', class: Google::Apis::AutoscalerV1beta2::Zone::MaintenanceWindow, decorator: Google::Apis::AutoscalerV1beta2::Zone::MaintenanceWindow::Representation
property :name, as: 'name'
property :region, as: 'region'
property :self_link, as: 'selfLink'
property :status, as: 'status'
end
# @private
class MaintenanceWindow
class Representation < Google::Apis::Core::JsonRepresentation
property :begin_time, as: 'beginTime'
property :description, as: 'description'
property :end_time, as: 'endTime'
property :name, as: 'name'
end
end
end
# @private
class ZoneList
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::AutoscalerV1beta2::Zone, decorator: Google::Apis::AutoscalerV1beta2::Zone::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
end
end
end

View File

@ -1,488 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AutoscalerV1beta2
# Google Compute Engine Autoscaler API
#
# The Google Compute Engine Autoscaler API provides autoscaling for groups of
# Cloud VMs.
#
# @example
# require 'google/apis/autoscaler_v1beta2'
#
# Autoscaler = Google::Apis::AutoscalerV1beta2 # Alias the module
# service = Autoscaler::AutoscalerService.new
#
# @see http://developers.google.com/compute/docs/autoscaler
class AutoscalerService < 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/', 'autoscaler/v1beta2/')
end
# Deletes the specified Autoscaler resource.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] autoscaler
# Name of the Autoscaler 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.
# 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::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::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_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['autoscaler'] = autoscaler unless autoscaler.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 Autoscaler resource.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] autoscaler
# Name of the Autoscaler 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.
# 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::AutoscalerV1beta2::Autoscaler] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::Autoscaler]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Autoscaler
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['autoscaler'] = autoscaler unless autoscaler.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 new Autoscaler resource.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [Google::Apis::AutoscalerV1beta2::Autoscaler] autoscaler_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::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::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_autoscaler(project, zone, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
command.request_object = autoscaler_object
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.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 Autoscaler resources in this zone.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] filter
# @param [Fixnum] max_results
# @param [String] 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.
# 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::AutoscalerV1beta2::ListAutoscalerResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_autoscalers(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['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
# Update the entire content of the Autoscaler resource. This method supports
# patch semantics.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] autoscaler
# Name of the Autoscaler resource.
# @param [Google::Apis::AutoscalerV1beta2::Autoscaler] autoscaler_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::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::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_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}'
command = make_simple_command(:patch, path, options)
command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
command.request_object = autoscaler_object
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['autoscaler'] = autoscaler unless autoscaler.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 the entire content of the Autoscaler resource.
# @param [String] project
# Project ID of Autoscaler resource.
# @param [String] zone
# Zone name of Autoscaler resource.
# @param [String] autoscaler
# Name of the Autoscaler resource.
# @param [Google::Apis::AutoscalerV1beta2::Autoscaler] autoscaler_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::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::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_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation
command.request_object = autoscaler_object
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['autoscaler'] = autoscaler unless autoscaler.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 zone-specific operation resource.
# @param [String] project
# @param [String] zone
# @param [String] operation
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/operations/{operation}'
command = make_simple_command(:delete, path, options)
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.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 zone-specific operation resource.
# @param [String] project
# @param [String] zone
# @param [String] operation
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::AutoscalerV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::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_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/operations/{operation}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.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 zone.
# @param [String] project
# @param [String] zone
# @param [String] filter
# @param [Fixnum] max_results
# @param [String] 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.
# 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::AutoscalerV1beta2::OperationList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::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_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/operations'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::OperationList::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::OperationList
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['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
#
# @param [String] project
# @param [String] filter
# @param [Fixnum] max_results
# @param [String] 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.
# 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::AutoscalerV1beta2::ZoneList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AutoscalerV1beta2::ZoneList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_zones(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::AutoscalerV1beta2::ZoneList::Representation
command.response_class = Google::Apis::AutoscalerV1beta2::ZoneList
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['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

View File

@ -1,49 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/bigquery_v2/service.rb'
require 'google/apis/bigquery_v2/classes.rb'
require 'google/apis/bigquery_v2/representations.rb'
module Google
module Apis
# BigQuery API
#
# A data platform for customers to create, manage, share and query data.
#
# @see https://cloud.google.com/bigquery/
module BigqueryV2
VERSION = 'V2'
REVISION = '20150526'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
# Insert data into Google BigQuery
AUTH_BIGQUERY_INSERTDATA = 'https://www.googleapis.com/auth/bigquery.insertdata'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# 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

View File

@ -1,753 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module BigqueryV2
class CsvOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Dataset
class Representation < Google::Apis::Core::JsonRepresentation; end
class Access
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class DatasetList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Dataset
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class DatasetReference
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ErrorProto
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExternalDataConfiguration
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GetQueryResultsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Job
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CancelJobResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfiguration
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationExtract
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationLink
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationLoad
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationQuery
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobConfigurationTableCopy
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Job
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class JobReference
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatistics
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatistics2
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatistics3
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatistics4
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ProjectList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Project
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class ProjectReference
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class QueryRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class QueryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Table
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableCell
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InsertAllTableDataRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
class Row
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class InsertAllTableDataResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
class InsertError
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class TableDataList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableFieldSchema
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Table
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class TableReference
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableRow
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TableSchema
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ViewDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class CsvOptions
class Representation < Google::Apis::Core::JsonRepresentation
property :allow_jagged_rows, as: 'allowJaggedRows'
property :allow_quoted_newlines, as: 'allowQuotedNewlines'
property :encoding, as: 'encoding'
property :field_delimiter, as: 'fieldDelimiter'
property :quote, as: 'quote'
property :skip_leading_rows, as: 'skipLeadingRows'
end
end
# @private
class Dataset
class Representation < Google::Apis::Core::JsonRepresentation
collection :access, as: 'access', class: Google::Apis::BigqueryV2::Dataset::Access, decorator: Google::Apis::BigqueryV2::Dataset::Access::Representation
property :creation_time, as: 'creationTime'
property :dataset_reference, as: 'datasetReference', class: Google::Apis::BigqueryV2::DatasetReference, decorator: Google::Apis::BigqueryV2::DatasetReference::Representation
property :default_table_expiration_ms, as: 'defaultTableExpirationMs'
property :description, as: 'description'
property :etag, as: 'etag'
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
property :last_modified_time, as: 'lastModifiedTime'
property :location, as: 'location'
property :self_link, as: 'selfLink'
end
# @private
class Access
class Representation < Google::Apis::Core::JsonRepresentation
property :domain, as: 'domain'
property :group_by_email, as: 'groupByEmail'
property :role, as: 'role'
property :special_group, as: 'specialGroup'
property :user_by_email, as: 'userByEmail'
property :view, as: 'view', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
end
end
end
# @private
class DatasetList
class Representation < Google::Apis::Core::JsonRepresentation
collection :datasets, as: 'datasets', class: Google::Apis::BigqueryV2::DatasetList::Dataset, decorator: Google::Apis::BigqueryV2::DatasetList::Dataset::Representation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
# @private
class Dataset
class Representation < Google::Apis::Core::JsonRepresentation
property :dataset_reference, as: 'datasetReference', class: Google::Apis::BigqueryV2::DatasetReference, decorator: Google::Apis::BigqueryV2::DatasetReference::Representation
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
end
end
end
# @private
class DatasetReference
class Representation < Google::Apis::Core::JsonRepresentation
property :dataset_id, as: 'datasetId'
property :project_id, as: 'projectId'
end
end
# @private
class ErrorProto
class Representation < Google::Apis::Core::JsonRepresentation
property :debug_info, as: 'debugInfo'
property :location, as: 'location'
property :message, as: 'message'
property :reason, as: 'reason'
end
end
# @private
class ExternalDataConfiguration
class Representation < Google::Apis::Core::JsonRepresentation
property :compression, as: 'compression'
property :csv_options, as: 'csvOptions', class: Google::Apis::BigqueryV2::CsvOptions, decorator: Google::Apis::BigqueryV2::CsvOptions::Representation
property :ignore_unknown_values, as: 'ignoreUnknownValues'
property :max_bad_records, as: 'maxBadRecords'
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :source_format, as: 'sourceFormat'
collection :source_uris, as: 'sourceUris'
end
end
# @private
class GetQueryResultsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :cache_hit, as: 'cacheHit'
property :etag, as: 'etag'
property :job_complete, as: 'jobComplete'
property :job_reference, as: 'jobReference', class: Google::Apis::BigqueryV2::JobReference, decorator: Google::Apis::BigqueryV2::JobReference::Representation
property :kind, as: 'kind'
property :page_token, as: 'pageToken'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::TableRow, decorator: Google::Apis::BigqueryV2::TableRow::Representation
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :total_bytes_processed, as: 'totalBytesProcessed'
property :total_rows, as: 'totalRows'
end
end
# @private
class Job
class Representation < Google::Apis::Core::JsonRepresentation
property :configuration, as: 'configuration', class: Google::Apis::BigqueryV2::JobConfiguration, decorator: Google::Apis::BigqueryV2::JobConfiguration::Representation
property :etag, as: 'etag'
property :id, as: 'id'
property :job_reference, as: 'jobReference', class: Google::Apis::BigqueryV2::JobReference, decorator: Google::Apis::BigqueryV2::JobReference::Representation
property :kind, as: 'kind'
property :self_link, as: 'selfLink'
property :statistics, as: 'statistics', class: Google::Apis::BigqueryV2::JobStatistics, decorator: Google::Apis::BigqueryV2::JobStatistics::Representation
property :status, as: 'status', class: Google::Apis::BigqueryV2::JobStatus, decorator: Google::Apis::BigqueryV2::JobStatus::Representation
property :user_email, as: 'user_email'
end
end
# @private
class CancelJobResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :job, as: 'job', class: Google::Apis::BigqueryV2::Job, decorator: Google::Apis::BigqueryV2::Job::Representation
property :kind, as: 'kind'
end
end
# @private
class JobConfiguration
class Representation < Google::Apis::Core::JsonRepresentation
property :copy, as: 'copy', class: Google::Apis::BigqueryV2::JobConfigurationTableCopy, decorator: Google::Apis::BigqueryV2::JobConfigurationTableCopy::Representation
property :dry_run, as: 'dryRun'
property :extract, as: 'extract', class: Google::Apis::BigqueryV2::JobConfigurationExtract, decorator: Google::Apis::BigqueryV2::JobConfigurationExtract::Representation
property :link, as: 'link', class: Google::Apis::BigqueryV2::JobConfigurationLink, decorator: Google::Apis::BigqueryV2::JobConfigurationLink::Representation
property :load, as: 'load', class: Google::Apis::BigqueryV2::JobConfigurationLoad, decorator: Google::Apis::BigqueryV2::JobConfigurationLoad::Representation
property :query, as: 'query', class: Google::Apis::BigqueryV2::JobConfigurationQuery, decorator: Google::Apis::BigqueryV2::JobConfigurationQuery::Representation
end
end
# @private
class JobConfigurationExtract
class Representation < Google::Apis::Core::JsonRepresentation
property :compression, as: 'compression'
property :destination_format, as: 'destinationFormat'
property :destination_uri, as: 'destinationUri'
collection :destination_uris, as: 'destinationUris'
property :field_delimiter, as: 'fieldDelimiter'
property :print_header, as: 'printHeader'
property :source_table, as: 'sourceTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
end
end
# @private
class JobConfigurationLink
class Representation < Google::Apis::Core::JsonRepresentation
property :create_disposition, as: 'createDisposition'
property :destination_table, as: 'destinationTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
collection :source_uri, as: 'sourceUri'
property :write_disposition, as: 'writeDisposition'
end
end
# @private
class JobConfigurationLoad
class Representation < Google::Apis::Core::JsonRepresentation
property :allow_jagged_rows, as: 'allowJaggedRows'
property :allow_quoted_newlines, as: 'allowQuotedNewlines'
property :create_disposition, as: 'createDisposition'
property :destination_table, as: 'destinationTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :encoding, as: 'encoding'
property :field_delimiter, as: 'fieldDelimiter'
property :ignore_unknown_values, as: 'ignoreUnknownValues'
property :max_bad_records, as: 'maxBadRecords'
collection :projection_fields, as: 'projectionFields'
property :quote, as: 'quote'
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :schema_inline, as: 'schemaInline'
property :schema_inline_format, as: 'schemaInlineFormat'
property :skip_leading_rows, as: 'skipLeadingRows'
property :source_format, as: 'sourceFormat'
collection :source_uris, as: 'sourceUris'
property :write_disposition, as: 'writeDisposition'
end
end
# @private
class JobConfigurationQuery
class Representation < Google::Apis::Core::JsonRepresentation
property :allow_large_results, as: 'allowLargeResults'
property :create_disposition, as: 'createDisposition'
property :default_dataset, as: 'defaultDataset', class: Google::Apis::BigqueryV2::DatasetReference, decorator: Google::Apis::BigqueryV2::DatasetReference::Representation
property :destination_table, as: 'destinationTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :flatten_results, as: 'flattenResults'
property :preserve_nulls, as: 'preserveNulls'
property :priority, as: 'priority'
property :query, as: 'query'
hash :table_definitions, as: 'tableDefinitions', class: Google::Apis::BigqueryV2::ExternalDataConfiguration, decorator: Google::Apis::BigqueryV2::ExternalDataConfiguration::Representation
property :use_query_cache, as: 'useQueryCache'
property :write_disposition, as: 'writeDisposition'
end
end
# @private
class JobConfigurationTableCopy
class Representation < Google::Apis::Core::JsonRepresentation
property :create_disposition, as: 'createDisposition'
property :destination_table, as: 'destinationTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :source_table, as: 'sourceTable', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
collection :source_tables, as: 'sourceTables', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :write_disposition, as: 'writeDisposition'
end
end
# @private
class JobList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :jobs, as: 'jobs', class: Google::Apis::BigqueryV2::JobList::Job, decorator: Google::Apis::BigqueryV2::JobList::Job::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
# @private
class Job
class Representation < Google::Apis::Core::JsonRepresentation
property :configuration, as: 'configuration', class: Google::Apis::BigqueryV2::JobConfiguration, decorator: Google::Apis::BigqueryV2::JobConfiguration::Representation
property :error_result, as: 'errorResult', class: Google::Apis::BigqueryV2::ErrorProto, decorator: Google::Apis::BigqueryV2::ErrorProto::Representation
property :id, as: 'id'
property :job_reference, as: 'jobReference', class: Google::Apis::BigqueryV2::JobReference, decorator: Google::Apis::BigqueryV2::JobReference::Representation
property :kind, as: 'kind'
property :state, as: 'state'
property :statistics, as: 'statistics', class: Google::Apis::BigqueryV2::JobStatistics, decorator: Google::Apis::BigqueryV2::JobStatistics::Representation
property :status, as: 'status', class: Google::Apis::BigqueryV2::JobStatus, decorator: Google::Apis::BigqueryV2::JobStatus::Representation
property :user_email, as: 'user_email'
end
end
end
# @private
class JobReference
class Representation < Google::Apis::Core::JsonRepresentation
property :job_id, as: 'jobId'
property :project_id, as: 'projectId'
end
end
# @private
class JobStatistics
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_time, as: 'creationTime'
property :end_time, as: 'endTime'
property :extract, as: 'extract', class: Google::Apis::BigqueryV2::JobStatistics4, decorator: Google::Apis::BigqueryV2::JobStatistics4::Representation
property :load, as: 'load', class: Google::Apis::BigqueryV2::JobStatistics3, decorator: Google::Apis::BigqueryV2::JobStatistics3::Representation
property :query, as: 'query', class: Google::Apis::BigqueryV2::JobStatistics2, decorator: Google::Apis::BigqueryV2::JobStatistics2::Representation
property :start_time, as: 'startTime'
property :total_bytes_processed, as: 'totalBytesProcessed'
end
end
# @private
class JobStatistics2
class Representation < Google::Apis::Core::JsonRepresentation
property :cache_hit, as: 'cacheHit'
property :total_bytes_processed, as: 'totalBytesProcessed'
end
end
# @private
class JobStatistics3
class Representation < Google::Apis::Core::JsonRepresentation
property :input_file_bytes, as: 'inputFileBytes'
property :input_files, as: 'inputFiles'
property :output_bytes, as: 'outputBytes'
property :output_rows, as: 'outputRows'
end
end
# @private
class JobStatistics4
class Representation < Google::Apis::Core::JsonRepresentation
collection :destination_uri_file_counts, as: 'destinationUriFileCounts'
end
end
# @private
class JobStatus
class Representation < Google::Apis::Core::JsonRepresentation
property :error_result, as: 'errorResult', class: Google::Apis::BigqueryV2::ErrorProto, decorator: Google::Apis::BigqueryV2::ErrorProto::Representation
collection :errors, as: 'errors', class: Google::Apis::BigqueryV2::ErrorProto, decorator: Google::Apis::BigqueryV2::ErrorProto::Representation
property :state, as: 'state'
end
end
# @private
class ProjectList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
collection :projects, as: 'projects', class: Google::Apis::BigqueryV2::ProjectList::Project, decorator: Google::Apis::BigqueryV2::ProjectList::Project::Representation
property :total_items, as: 'totalItems'
end
# @private
class Project
class Representation < Google::Apis::Core::JsonRepresentation
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
property :numeric_id, as: 'numericId'
property :project_reference, as: 'projectReference', class: Google::Apis::BigqueryV2::ProjectReference, decorator: Google::Apis::BigqueryV2::ProjectReference::Representation
end
end
end
# @private
class ProjectReference
class Representation < Google::Apis::Core::JsonRepresentation
property :project_id, as: 'projectId'
end
end
# @private
class QueryRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :default_dataset, as: 'defaultDataset', class: Google::Apis::BigqueryV2::DatasetReference, decorator: Google::Apis::BigqueryV2::DatasetReference::Representation
property :dry_run, as: 'dryRun'
property :kind, as: 'kind'
property :max_results, as: 'maxResults'
property :preserve_nulls, as: 'preserveNulls'
property :query, as: 'query'
property :timeout_ms, as: 'timeoutMs'
property :use_query_cache, as: 'useQueryCache'
end
end
# @private
class QueryResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :cache_hit, as: 'cacheHit'
property :job_complete, as: 'jobComplete'
property :job_reference, as: 'jobReference', class: Google::Apis::BigqueryV2::JobReference, decorator: Google::Apis::BigqueryV2::JobReference::Representation
property :kind, as: 'kind'
property :page_token, as: 'pageToken'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::TableRow, decorator: Google::Apis::BigqueryV2::TableRow::Representation
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :total_bytes_processed, as: 'totalBytesProcessed'
property :total_rows, as: 'totalRows'
end
end
# @private
class Table
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_time, as: 'creationTime'
property :description, as: 'description'
property :etag, as: 'etag'
property :expiration_time, as: 'expirationTime'
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
property :last_modified_time, as: 'lastModifiedTime'
property :num_bytes, as: 'numBytes'
property :num_rows, as: 'numRows'
property :schema, as: 'schema', class: Google::Apis::BigqueryV2::TableSchema, decorator: Google::Apis::BigqueryV2::TableSchema::Representation
property :self_link, as: 'selfLink'
property :table_reference, as: 'tableReference', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :type, as: 'type'
property :view, as: 'view', class: Google::Apis::BigqueryV2::ViewDefinition, decorator: Google::Apis::BigqueryV2::ViewDefinition::Representation
end
end
# @private
class TableCell
class Representation < Google::Apis::Core::JsonRepresentation
property :v, as: 'v'
end
end
# @private
class InsertAllTableDataRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :ignore_unknown_values, as: 'ignoreUnknownValues'
property :kind, as: 'kind'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::InsertAllTableDataRequest::Row, decorator: Google::Apis::BigqueryV2::InsertAllTableDataRequest::Row::Representation
property :skip_invalid_rows, as: 'skipInvalidRows'
end
# @private
class Row
class Representation < Google::Apis::Core::JsonRepresentation
property :insert_id, as: 'insertId'
hash :json, as: 'json'
end
end
end
# @private
class InsertAllTableDataResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :insert_errors, as: 'insertErrors', class: Google::Apis::BigqueryV2::InsertAllTableDataResponse::InsertError, decorator: Google::Apis::BigqueryV2::InsertAllTableDataResponse::InsertError::Representation
property :kind, as: 'kind'
end
# @private
class InsertError
class Representation < Google::Apis::Core::JsonRepresentation
collection :errors, as: 'errors', class: Google::Apis::BigqueryV2::ErrorProto, decorator: Google::Apis::BigqueryV2::ErrorProto::Representation
property :index, as: 'index'
end
end
end
# @private
class TableDataList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :page_token, as: 'pageToken'
collection :rows, as: 'rows', class: Google::Apis::BigqueryV2::TableRow, decorator: Google::Apis::BigqueryV2::TableRow::Representation
property :total_rows, as: 'totalRows'
end
end
# @private
class TableFieldSchema
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
collection :fields, as: 'fields', class: Google::Apis::BigqueryV2::TableFieldSchema, decorator: Google::Apis::BigqueryV2::TableFieldSchema::Representation
property :mode, as: 'mode'
property :name, as: 'name'
property :type, as: 'type'
end
end
# @private
class TableList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
collection :tables, as: 'tables', class: Google::Apis::BigqueryV2::TableList::Table, decorator: Google::Apis::BigqueryV2::TableList::Table::Representation
property :total_items, as: 'totalItems'
end
# @private
class Table
class Representation < Google::Apis::Core::JsonRepresentation
property :friendly_name, as: 'friendlyName'
property :id, as: 'id'
property :kind, as: 'kind'
property :table_reference, as: 'tableReference', class: Google::Apis::BigqueryV2::TableReference, decorator: Google::Apis::BigqueryV2::TableReference::Representation
property :type, as: 'type'
end
end
end
# @private
class TableReference
class Representation < Google::Apis::Core::JsonRepresentation
property :dataset_id, as: 'datasetId'
property :project_id, as: 'projectId'
property :table_id, as: 'tableId'
end
end
# @private
class TableRow
class Representation < Google::Apis::Core::JsonRepresentation
collection :f, as: 'f', class: Google::Apis::BigqueryV2::TableCell, decorator: Google::Apis::BigqueryV2::TableCell::Representation
end
end
# @private
class TableSchema
class Representation < Google::Apis::Core::JsonRepresentation
collection :fields, as: 'fields', class: Google::Apis::BigqueryV2::TableFieldSchema, decorator: Google::Apis::BigqueryV2::TableFieldSchema::Representation
end
end
# @private
class ViewDefinition
class Representation < Google::Apis::Core::JsonRepresentation
property :query, as: 'query'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/blogger_v3/service.rb'
require 'google/apis/blogger_v3/classes.rb'
require 'google/apis/blogger_v3/representations.rb'
module Google
module Apis
# Blogger API
#
# API for access to the data within Blogger.
#
# @see https://developers.google.com/blogger/docs/3.0/getting_started
module BloggerV3
VERSION = 'V3'
REVISION = '20150422'
# Manage your Blogger account
AUTH_BLOGGER = 'https://www.googleapis.com/auth/blogger'
# View your Blogger account
AUTH_BLOGGER_READONLY = 'https://www.googleapis.com/auth/blogger.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,562 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module BloggerV3
class Blog
class Representation < Google::Apis::Core::JsonRepresentation; end
class Locale
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Pages
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Posts
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class BlogList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class BlogPerUserInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class BlogUserInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
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
end
end
class Blog
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class InReplyTo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Post
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class CommentList
class Representation < Google::Apis::Core::JsonRepresentation; end
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
end
end
class Blog
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class PageList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Pageviews
class Representation < Google::Apis::Core::JsonRepresentation; end
class Count
class Representation < Google::Apis::Core::JsonRepresentation; end
end
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
end
end
class Blog
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Location
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Replies
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class PostList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PostPerUserInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PostUserInfo
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PostUserInfosList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class User
class Representation < Google::Apis::Core::JsonRepresentation; end
class Blogs
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Locale
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
# @private
class Blog
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_meta_data, as: 'customMetaData'
property :description, as: 'description'
property :id, as: 'id'
property :kind, as: 'kind'
property :locale, as: 'locale', class: Google::Apis::BloggerV3::Blog::Locale, decorator: Google::Apis::BloggerV3::Blog::Locale::Representation
property :name, as: 'name'
property :pages, as: 'pages', class: Google::Apis::BloggerV3::Blog::Pages, decorator: Google::Apis::BloggerV3::Blog::Pages::Representation
property :posts, as: 'posts', class: Google::Apis::BloggerV3::Blog::Posts, decorator: Google::Apis::BloggerV3::Blog::Posts::Representation
property :published, as: 'published', type: DateTime
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :updated, as: 'updated', type: DateTime
property :url, as: 'url'
end
# @private
class Locale
class Representation < Google::Apis::Core::JsonRepresentation
property :country, as: 'country'
property :language, as: 'language'
property :variant, as: 'variant'
end
end
# @private
class Pages
class Representation < Google::Apis::Core::JsonRepresentation
property :self_link, as: 'selfLink'
property :total_items, as: 'totalItems'
end
end
# @private
class Posts
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::BloggerV3::Post, decorator: Google::Apis::BloggerV3::Post::Representation
property :self_link, as: 'selfLink'
property :total_items, as: 'totalItems'
end
end
end
# @private
class BlogList
class Representation < Google::Apis::Core::JsonRepresentation
collection :blog_user_infos, as: 'blogUserInfos', class: Google::Apis::BloggerV3::BlogUserInfo, decorator: Google::Apis::BloggerV3::BlogUserInfo::Representation
collection :items, as: 'items', class: Google::Apis::BloggerV3::Blog, decorator: Google::Apis::BloggerV3::Blog::Representation
property :kind, as: 'kind'
end
end
# @private
class BlogPerUserInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :blog_id, as: 'blogId'
property :has_admin_access, as: 'hasAdminAccess'
property :kind, as: 'kind'
property :photos_album_key, as: 'photosAlbumKey'
property :role, as: 'role'
property :user_id, as: 'userId'
end
end
# @private
class BlogUserInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :blog, as: 'blog', class: Google::Apis::BloggerV3::Blog, decorator: Google::Apis::BloggerV3::Blog::Representation
property :blog_user_info, as: 'blog_user_info', class: Google::Apis::BloggerV3::BlogPerUserInfo, decorator: Google::Apis::BloggerV3::BlogPerUserInfo::Representation
property :kind, as: 'kind'
end
end
# @private
class Comment
class Representation < Google::Apis::Core::JsonRepresentation
property :author, as: 'author', class: Google::Apis::BloggerV3::Comment::Author, decorator: Google::Apis::BloggerV3::Comment::Author::Representation
property :blog, as: 'blog', class: Google::Apis::BloggerV3::Comment::Blog, decorator: Google::Apis::BloggerV3::Comment::Blog::Representation
property :content, as: 'content'
property :id, as: 'id'
property :in_reply_to, as: 'inReplyTo', class: Google::Apis::BloggerV3::Comment::InReplyTo, decorator: Google::Apis::BloggerV3::Comment::InReplyTo::Representation
property :kind, as: 'kind'
property :post, as: 'post', class: Google::Apis::BloggerV3::Comment::Post, decorator: Google::Apis::BloggerV3::Comment::Post::Representation
property :published, as: 'published', type: DateTime
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :updated, as: 'updated', type: DateTime
end
# @private
class Author
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :id, as: 'id'
property :image, as: 'image', class: Google::Apis::BloggerV3::Comment::Author::Image, decorator: Google::Apis::BloggerV3::Comment::Author::Image::Representation
property :url, as: 'url'
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
end
# @private
class Blog
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
# @private
class InReplyTo
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
# @private
class Post
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
end
# @private
class CommentList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::BloggerV3::Comment, decorator: Google::Apis::BloggerV3::Comment::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :prev_page_token, as: 'prevPageToken'
end
end
# @private
class Page
class Representation < Google::Apis::Core::JsonRepresentation
property :author, as: 'author', class: Google::Apis::BloggerV3::Page::Author, decorator: Google::Apis::BloggerV3::Page::Author::Representation
property :blog, as: 'blog', class: Google::Apis::BloggerV3::Page::Blog, decorator: Google::Apis::BloggerV3::Page::Blog::Representation
property :content, as: 'content'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :published, as: 'published', type: DateTime
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :title, as: 'title'
property :updated, as: 'updated', type: DateTime
property :url, as: 'url'
end
# @private
class Author
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :id, as: 'id'
property :image, as: 'image', class: Google::Apis::BloggerV3::Page::Author::Image, decorator: Google::Apis::BloggerV3::Page::Author::Image::Representation
property :url, as: 'url'
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
end
# @private
class Blog
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
end
# @private
class PageList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::BloggerV3::Page, decorator: Google::Apis::BloggerV3::Page::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Pageviews
class Representation < Google::Apis::Core::JsonRepresentation
property :blog_id, as: 'blogId'
collection :counts, as: 'counts', class: Google::Apis::BloggerV3::Pageviews::Count, decorator: Google::Apis::BloggerV3::Pageviews::Count::Representation
property :kind, as: 'kind'
end
# @private
class Count
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :time_range, as: 'timeRange'
end
end
end
# @private
class Post
class Representation < Google::Apis::Core::JsonRepresentation
property :author, as: 'author', class: Google::Apis::BloggerV3::Post::Author, decorator: Google::Apis::BloggerV3::Post::Author::Representation
property :blog, as: 'blog', class: Google::Apis::BloggerV3::Post::Blog, decorator: Google::Apis::BloggerV3::Post::Blog::Representation
property :content, as: 'content'
property :custom_meta_data, as: 'customMetaData'
property :etag, as: 'etag'
property :id, as: 'id'
collection :images, as: 'images', class: Google::Apis::BloggerV3::Post::Image, decorator: Google::Apis::BloggerV3::Post::Image::Representation
property :kind, as: 'kind'
collection :labels, as: 'labels'
property :location, as: 'location', class: Google::Apis::BloggerV3::Post::Location, decorator: Google::Apis::BloggerV3::Post::Location::Representation
property :published, as: 'published', type: DateTime
property :reader_comments, as: 'readerComments'
property :replies, as: 'replies', class: Google::Apis::BloggerV3::Post::Replies, decorator: Google::Apis::BloggerV3::Post::Replies::Representation
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :title, as: 'title'
property :title_link, as: 'titleLink'
property :updated, as: 'updated', type: DateTime
property :url, as: 'url'
end
# @private
class Author
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :id, as: 'id'
property :image, as: 'image', class: Google::Apis::BloggerV3::Post::Author::Image, decorator: Google::Apis::BloggerV3::Post::Author::Image::Representation
property :url, as: 'url'
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
end
# @private
class Blog
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end
# @private
class Location
class Representation < Google::Apis::Core::JsonRepresentation
property :lat, as: 'lat'
property :lng, as: 'lng'
property :name, as: 'name'
property :span, as: 'span'
end
end
# @private
class Replies
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::BloggerV3::Comment, decorator: Google::Apis::BloggerV3::Comment::Representation
property :self_link, as: 'selfLink'
property :total_items, as: 'totalItems'
end
end
end
# @private
class PostList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::BloggerV3::Post, decorator: Google::Apis::BloggerV3::Post::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class PostPerUserInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :blog_id, as: 'blogId'
property :has_edit_access, as: 'hasEditAccess'
property :kind, as: 'kind'
property :post_id, as: 'postId'
property :user_id, as: 'userId'
end
end
# @private
class PostUserInfo
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :post, as: 'post', class: Google::Apis::BloggerV3::Post, decorator: Google::Apis::BloggerV3::Post::Representation
property :post_user_info, as: 'post_user_info', class: Google::Apis::BloggerV3::PostPerUserInfo, decorator: Google::Apis::BloggerV3::PostPerUserInfo::Representation
end
end
# @private
class PostUserInfosList
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::BloggerV3::PostUserInfo, decorator: Google::Apis::BloggerV3::PostUserInfo::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class User
class Representation < Google::Apis::Core::JsonRepresentation
property :about, as: 'about'
property :blogs, as: 'blogs', class: Google::Apis::BloggerV3::User::Blogs, decorator: Google::Apis::BloggerV3::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::BloggerV3::User::Locale, decorator: Google::Apis::BloggerV3::User::Locale::Representation
property :self_link, as: 'selfLink'
property :url, as: 'url'
end
# @private
class Blogs
class Representation < Google::Apis::Core::JsonRepresentation
property :self_link, as: 'selfLink'
end
end
# @private
class Locale
class Representation < Google::Apis::Core::JsonRepresentation
property :country, as: 'country'
property :language, as: 'language'
property :variant, as: 'variant'
end
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/books_v1/service.rb'
require 'google/apis/books_v1/classes.rb'
require 'google/apis/books_v1/representations.rb'
module Google
module Apis
# Books API
#
# Lets you search for books and manage your Google Books library.
#
# @see https://developers.google.com/books/docs/v1/getting_started
module BooksV1
VERSION = 'V1'
REVISION = '20150318'
# Manage your books
AUTH_BOOKS = 'https://www.googleapis.com/auth/books'
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/calendar_v3/service.rb'
require 'google/apis/calendar_v3/classes.rb'
require 'google/apis/calendar_v3/representations.rb'
module Google
module Apis
# Calendar API
#
# Lets you manipulate events and other calendar data.
#
# @see https://developers.google.com/google-apps/calendar/firstapp
module CalendarV3
VERSION = 'V3'
REVISION = '20150408'
# Manage your calendars
AUTH_CALENDAR = 'https://www.googleapis.com/auth/calendar'
# View your calendars
AUTH_CALENDAR_READONLY = 'https://www.googleapis.com/auth/calendar.readonly'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,560 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CalendarV3
class Acl
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AclRule
class Representation < Google::Apis::Core::JsonRepresentation; end
class Scope
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Calendar
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CalendarList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CalendarListEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
class NotificationSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class CalendarNotification
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Channel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ColorDefinition
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Colors
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Error
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Event
class Representation < Google::Apis::Core::JsonRepresentation; end
class Creator
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ExtendedProperties
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Gadget
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Organizer
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Reminders
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Source
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class EventAttachment
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EventAttendee
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EventDateTime
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EventReminder
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Events
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyCalendar
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyGroup
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyRequestItem
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class FreeBusyResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Setting
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Settings
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TimePeriod
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Acl
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::CalendarV3::AclRule, decorator: Google::Apis::CalendarV3::AclRule::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :next_sync_token, as: 'nextSyncToken'
end
end
# @private
class AclRule
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :role, as: 'role'
property :scope, as: 'scope', class: Google::Apis::CalendarV3::AclRule::Scope, decorator: Google::Apis::CalendarV3::AclRule::Scope::Representation
end
# @private
class Scope
class Representation < Google::Apis::Core::JsonRepresentation
property :type, as: 'type'
property :value, as: 'value'
end
end
end
# @private
class Calendar
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :location, as: 'location'
property :summary, as: 'summary'
property :time_zone, as: 'timeZone'
end
end
# @private
class CalendarList
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::CalendarV3::CalendarListEntry, decorator: Google::Apis::CalendarV3::CalendarListEntry::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :next_sync_token, as: 'nextSyncToken'
end
end
# @private
class CalendarListEntry
class Representation < Google::Apis::Core::JsonRepresentation
property :access_role, as: 'accessRole'
property :background_color, as: 'backgroundColor'
property :color_id, as: 'colorId'
collection :default_reminders, as: 'defaultReminders', class: Google::Apis::CalendarV3::EventReminder, decorator: Google::Apis::CalendarV3::EventReminder::Representation
property :deleted, as: 'deleted'
property :description, as: 'description'
property :etag, as: 'etag'
property :foreground_color, as: 'foregroundColor'
property :hidden, as: 'hidden'
property :id, as: 'id'
property :kind, as: 'kind'
property :location, as: 'location'
property :notification_settings, as: 'notificationSettings', class: Google::Apis::CalendarV3::CalendarListEntry::NotificationSettings, decorator: Google::Apis::CalendarV3::CalendarListEntry::NotificationSettings::Representation
property :primary, as: 'primary'
property :selected, as: 'selected'
property :summary, as: 'summary'
property :summary_override, as: 'summaryOverride'
property :time_zone, as: 'timeZone'
end
# @private
class NotificationSettings
class Representation < Google::Apis::Core::JsonRepresentation
collection :notifications, as: 'notifications', class: Google::Apis::CalendarV3::CalendarNotification, decorator: Google::Apis::CalendarV3::CalendarNotification::Representation
end
end
end
# @private
class CalendarNotification
class Representation < Google::Apis::Core::JsonRepresentation
property :delivery_method, as: 'method'
property :type, as: 'type'
end
end
# @private
class Channel
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address'
property :expiration, as: 'expiration'
property :id, as: 'id'
property :kind, as: 'kind'
hash :params, as: 'params'
property :payload, as: 'payload'
property :resource_id, as: 'resourceId'
property :resource_uri, as: 'resourceUri'
property :token, as: 'token'
property :type, as: 'type'
end
end
# @private
class ColorDefinition
class Representation < Google::Apis::Core::JsonRepresentation
property :background, as: 'background'
property :foreground, as: 'foreground'
end
end
# @private
class Colors
class Representation < Google::Apis::Core::JsonRepresentation
hash :calendar, as: 'calendar', class: Google::Apis::CalendarV3::ColorDefinition, decorator: Google::Apis::CalendarV3::ColorDefinition::Representation
hash :event, as: 'event', class: Google::Apis::CalendarV3::ColorDefinition, decorator: Google::Apis::CalendarV3::ColorDefinition::Representation
property :kind, as: 'kind'
property :updated, as: 'updated', type: DateTime
end
end
# @private
class Error
class Representation < Google::Apis::Core::JsonRepresentation
property :domain, as: 'domain'
property :reason, as: 'reason'
end
end
# @private
class Event
class Representation < Google::Apis::Core::JsonRepresentation
property :anyone_can_add_self, as: 'anyoneCanAddSelf'
collection :attendees, as: 'attendees', class: Google::Apis::CalendarV3::EventAttendee, decorator: Google::Apis::CalendarV3::EventAttendee::Representation
property :attendees_omitted, as: 'attendeesOmitted'
property :color_id, as: 'colorId'
property :created, as: 'created', type: DateTime
property :creator, as: 'creator', class: Google::Apis::CalendarV3::Event::Creator, decorator: Google::Apis::CalendarV3::Event::Creator::Representation
property :description, as: 'description'
property :end, as: 'end', class: Google::Apis::CalendarV3::EventDateTime, decorator: Google::Apis::CalendarV3::EventDateTime::Representation
property :end_time_unspecified, as: 'endTimeUnspecified'
property :etag, as: 'etag'
property :extended_properties, as: 'extendedProperties', class: Google::Apis::CalendarV3::Event::ExtendedProperties, decorator: Google::Apis::CalendarV3::Event::ExtendedProperties::Representation
property :gadget, as: 'gadget', class: Google::Apis::CalendarV3::Event::Gadget, decorator: Google::Apis::CalendarV3::Event::Gadget::Representation
property :guests_can_invite_others, as: 'guestsCanInviteOthers'
property :guests_can_modify, as: 'guestsCanModify'
property :guests_can_see_other_guests, as: 'guestsCanSeeOtherGuests'
property :hangout_link, as: 'hangoutLink'
property :html_link, as: 'htmlLink'
property :i_cal_uid, as: 'iCalUID'
property :id, as: 'id'
property :kind, as: 'kind'
property :location, as: 'location'
property :locked, as: 'locked'
property :organizer, as: 'organizer', class: Google::Apis::CalendarV3::Event::Organizer, decorator: Google::Apis::CalendarV3::Event::Organizer::Representation
property :original_start_time, as: 'originalStartTime', class: Google::Apis::CalendarV3::EventDateTime, decorator: Google::Apis::CalendarV3::EventDateTime::Representation
property :private_copy, as: 'privateCopy'
collection :recurrence, as: 'recurrence'
property :recurring_event_id, as: 'recurringEventId'
property :reminders, as: 'reminders', class: Google::Apis::CalendarV3::Event::Reminders, decorator: Google::Apis::CalendarV3::Event::Reminders::Representation
property :sequence, as: 'sequence'
property :source, as: 'source', class: Google::Apis::CalendarV3::Event::Source, decorator: Google::Apis::CalendarV3::Event::Source::Representation
property :start, as: 'start', class: Google::Apis::CalendarV3::EventDateTime, decorator: Google::Apis::CalendarV3::EventDateTime::Representation
property :status, as: 'status'
property :summary, as: 'summary'
property :transparency, as: 'transparency'
property :updated, as: 'updated', type: DateTime
property :visibility, as: 'visibility'
end
# @private
class Creator
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :email, as: 'email'
property :id, as: 'id'
property :self, as: 'self'
end
end
# @private
class ExtendedProperties
class Representation < Google::Apis::Core::JsonRepresentation
hash :private, as: 'private'
hash :shared, as: 'shared'
end
end
# @private
class Gadget
class Representation < Google::Apis::Core::JsonRepresentation
property :display_mode, as: 'display'
property :height, as: 'height'
property :icon_link, as: 'iconLink'
property :link, as: 'link'
hash :preferences, as: 'preferences'
property :title, as: 'title'
property :type, as: 'type'
property :width, as: 'width'
end
end
# @private
class Organizer
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :email, as: 'email'
property :id, as: 'id'
property :self, as: 'self'
end
end
# @private
class Reminders
class Representation < Google::Apis::Core::JsonRepresentation
collection :overrides, as: 'overrides', class: Google::Apis::CalendarV3::EventReminder, decorator: Google::Apis::CalendarV3::EventReminder::Representation
property :use_default, as: 'useDefault'
end
end
# @private
class Source
class Representation < Google::Apis::Core::JsonRepresentation
property :title, as: 'title'
property :url, as: 'url'
end
end
end
# @private
class EventAttachment
class Representation < Google::Apis::Core::JsonRepresentation
end
end
# @private
class EventAttendee
class Representation < Google::Apis::Core::JsonRepresentation
property :additional_guests, as: 'additionalGuests'
property :comment, as: 'comment'
property :display_name, as: 'displayName'
property :email, as: 'email'
property :id, as: 'id'
property :optional, as: 'optional'
property :organizer, as: 'organizer'
property :resource, as: 'resource'
property :response_status, as: 'responseStatus'
property :self, as: 'self'
end
end
# @private
class EventDateTime
class Representation < Google::Apis::Core::JsonRepresentation
property :date, as: 'date', type: Date
property :date_time, as: 'dateTime', type: DateTime
property :time_zone, as: 'timeZone'
end
end
# @private
class EventReminder
class Representation < Google::Apis::Core::JsonRepresentation
property :reminder_method, as: 'method'
property :minutes, as: 'minutes'
end
end
# @private
class Events
class Representation < Google::Apis::Core::JsonRepresentation
property :access_role, as: 'accessRole'
collection :default_reminders, as: 'defaultReminders', class: Google::Apis::CalendarV3::EventReminder, decorator: Google::Apis::CalendarV3::EventReminder::Representation
property :description, as: 'description'
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::CalendarV3::Event, decorator: Google::Apis::CalendarV3::Event::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :next_sync_token, as: 'nextSyncToken'
property :summary, as: 'summary'
property :time_zone, as: 'timeZone'
property :updated, as: 'updated', type: DateTime
end
end
# @private
class FreeBusyCalendar
class Representation < Google::Apis::Core::JsonRepresentation
collection :busy, as: 'busy', class: Google::Apis::CalendarV3::TimePeriod, decorator: Google::Apis::CalendarV3::TimePeriod::Representation
collection :errors, as: 'errors', class: Google::Apis::CalendarV3::Error, decorator: Google::Apis::CalendarV3::Error::Representation
end
end
# @private
class FreeBusyGroup
class Representation < Google::Apis::Core::JsonRepresentation
collection :calendars, as: 'calendars'
collection :errors, as: 'errors', class: Google::Apis::CalendarV3::Error, decorator: Google::Apis::CalendarV3::Error::Representation
end
end
# @private
class FreeBusyRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :calendar_expansion_max, as: 'calendarExpansionMax'
property :group_expansion_max, as: 'groupExpansionMax'
collection :items, as: 'items', class: Google::Apis::CalendarV3::FreeBusyRequestItem, decorator: Google::Apis::CalendarV3::FreeBusyRequestItem::Representation
property :time_max, as: 'timeMax', type: DateTime
property :time_min, as: 'timeMin', type: DateTime
property :time_zone, as: 'timeZone'
end
end
# @private
class FreeBusyRequestItem
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
end
end
# @private
class FreeBusyResponse
class Representation < Google::Apis::Core::JsonRepresentation
hash :calendars, as: 'calendars', class: Google::Apis::CalendarV3::FreeBusyCalendar, decorator: Google::Apis::CalendarV3::FreeBusyCalendar::Representation
hash :groups, as: 'groups', class: Google::Apis::CalendarV3::FreeBusyGroup, decorator: Google::Apis::CalendarV3::FreeBusyGroup::Representation
property :kind, as: 'kind'
property :time_max, as: 'timeMax', type: DateTime
property :time_min, as: 'timeMin', type: DateTime
end
end
# @private
class Setting
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
property :id, as: 'id'
property :kind, as: 'kind'
property :value, as: 'value'
end
end
# @private
class Settings
class Representation < Google::Apis::Core::JsonRepresentation
property :etag, as: 'etag'
collection :items, as: 'items', class: Google::Apis::CalendarV3::Setting, decorator: Google::Apis::CalendarV3::Setting::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :next_sync_token, as: 'nextSyncToken'
end
end
# @private
class TimePeriod
class Representation < Google::Apis::Core::JsonRepresentation
property :end, as: 'end', type: DateTime
property :start, as: 'start', type: DateTime
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/civicinfo_v2/service.rb'
require 'google/apis/civicinfo_v2/classes.rb'
require 'google/apis/civicinfo_v2/representations.rb'
module Google
module Apis
# Google Civic Information API
#
# An API for accessing civic information.
#
# @see https://developers.google.com/civic-information
module CivicinfoV2
VERSION = 'V2'
REVISION = '20150302'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,374 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CivicinfoV2
class AdministrationRegion
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AdministrativeBody
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Candidate
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Channel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Contest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SearchDivisionResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DivisionSearchResult
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Election
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ElectionOfficial
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class QueryElectionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ElectoralDistrict
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GeographicDivision
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Office
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Official
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PollingLocation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class RepresentativeInfoData
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class RepresentativeInfoResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SimpleAddressType
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Source
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class VoterInfoResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class AdministrationRegion
class Representation < Google::Apis::Core::JsonRepresentation
property :election_administration_body, as: 'electionAdministrationBody', class: Google::Apis::CivicinfoV2::AdministrativeBody, decorator: Google::Apis::CivicinfoV2::AdministrativeBody::Representation
property :id, as: 'id'
property :local_jurisdiction, as: 'local_jurisdiction', class: Google::Apis::CivicinfoV2::AdministrationRegion, decorator: Google::Apis::CivicinfoV2::AdministrationRegion::Representation
property :name, as: 'name'
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::Source, decorator: Google::Apis::CivicinfoV2::Source::Representation
end
end
# @private
class AdministrativeBody
class Representation < Google::Apis::Core::JsonRepresentation
property :absentee_voting_info_url, as: 'absenteeVotingInfoUrl'
property :ballot_info_url, as: 'ballotInfoUrl'
property :correspondence_address, as: 'correspondenceAddress', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
property :election_info_url, as: 'electionInfoUrl'
collection :election_officials, as: 'electionOfficials', class: Google::Apis::CivicinfoV2::ElectionOfficial, decorator: Google::Apis::CivicinfoV2::ElectionOfficial::Representation
property :election_registration_confirmation_url, as: 'electionRegistrationConfirmationUrl'
property :election_registration_url, as: 'electionRegistrationUrl'
property :election_rules_url, as: 'electionRulesUrl'
property :hours_of_operation, as: 'hoursOfOperation'
property :name, as: 'name'
property :physical_address, as: 'physicalAddress', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
collection :voter_services, as: 'voter_services'
property :voting_location_finder_url, as: 'votingLocationFinderUrl'
end
end
# @private
class Candidate
class Representation < Google::Apis::Core::JsonRepresentation
property :candidate_url, as: 'candidateUrl'
collection :channels, as: 'channels', class: Google::Apis::CivicinfoV2::Channel, decorator: Google::Apis::CivicinfoV2::Channel::Representation
property :email, as: 'email'
property :name, as: 'name'
property :order_on_ballot, as: 'orderOnBallot'
property :party, as: 'party'
property :phone, as: 'phone'
property :photo_url, as: 'photoUrl'
end
end
# @private
class Channel
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :type, as: 'type'
end
end
# @private
class Contest
class Representation < Google::Apis::Core::JsonRepresentation
property :ballot_placement, as: 'ballotPlacement'
collection :candidates, as: 'candidates', class: Google::Apis::CivicinfoV2::Candidate, decorator: Google::Apis::CivicinfoV2::Candidate::Representation
property :district, as: 'district', class: Google::Apis::CivicinfoV2::ElectoralDistrict, decorator: Google::Apis::CivicinfoV2::ElectoralDistrict::Representation
property :electorate_specifications, as: 'electorateSpecifications'
property :id, as: 'id'
collection :level, as: 'level'
property :number_elected, as: 'numberElected'
property :number_voting_for, as: 'numberVotingFor'
property :office, as: 'office'
property :primary_party, as: 'primaryParty'
property :referendum_subtitle, as: 'referendumSubtitle'
property :referendum_title, as: 'referendumTitle'
property :referendum_url, as: 'referendumUrl'
collection :roles, as: 'roles'
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::Source, decorator: Google::Apis::CivicinfoV2::Source::Representation
property :special, as: 'special'
property :type, as: 'type'
end
end
# @private
class SearchDivisionResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :results, as: 'results', class: Google::Apis::CivicinfoV2::DivisionSearchResult, decorator: Google::Apis::CivicinfoV2::DivisionSearchResult::Representation
end
end
# @private
class DivisionSearchResult
class Representation < Google::Apis::Core::JsonRepresentation
collection :aliases, as: 'aliases'
property :name, as: 'name'
property :ocd_id, as: 'ocdId'
end
end
# @private
class Election
class Representation < Google::Apis::Core::JsonRepresentation
property :election_day, as: 'electionDay'
property :id, as: 'id'
property :name, as: 'name'
end
end
# @private
class ElectionOfficial
class Representation < Google::Apis::Core::JsonRepresentation
property :email_address, as: 'emailAddress'
property :fax_number, as: 'faxNumber'
property :name, as: 'name'
property :office_phone_number, as: 'officePhoneNumber'
property :title, as: 'title'
end
end
# @private
class QueryElectionsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :elections, as: 'elections', class: Google::Apis::CivicinfoV2::Election, decorator: Google::Apis::CivicinfoV2::Election::Representation
property :kind, as: 'kind'
end
end
# @private
class ElectoralDistrict
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :name, as: 'name'
property :scope, as: 'scope'
end
end
# @private
class GeographicDivision
class Representation < Google::Apis::Core::JsonRepresentation
collection :also_known_as, as: 'alsoKnownAs'
property :name, as: 'name'
collection :office_indices, as: 'officeIndices'
end
end
# @private
class Office
class Representation < Google::Apis::Core::JsonRepresentation
property :division_id, as: 'divisionId'
collection :levels, as: 'levels'
property :name, as: 'name'
collection :official_indices, as: 'officialIndices'
collection :roles, as: 'roles'
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::Source, decorator: Google::Apis::CivicinfoV2::Source::Representation
end
end
# @private
class Official
class Representation < Google::Apis::Core::JsonRepresentation
collection :address, as: 'address', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
collection :channels, as: 'channels', class: Google::Apis::CivicinfoV2::Channel, decorator: Google::Apis::CivicinfoV2::Channel::Representation
collection :emails, as: 'emails'
property :name, as: 'name'
property :party, as: 'party'
collection :phones, as: 'phones'
property :photo_url, as: 'photoUrl'
collection :urls, as: 'urls'
end
end
# @private
class PollingLocation
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
property :end_date, as: 'endDate'
property :id, as: 'id'
property :name, as: 'name'
property :notes, as: 'notes'
property :polling_hours, as: 'pollingHours'
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::Source, decorator: Google::Apis::CivicinfoV2::Source::Representation
property :start_date, as: 'startDate'
property :voter_services, as: 'voterServices'
end
end
# @private
class RepresentativeInfoData
class Representation < Google::Apis::Core::JsonRepresentation
hash :divisions, as: 'divisions', class: Google::Apis::CivicinfoV2::GeographicDivision, decorator: Google::Apis::CivicinfoV2::GeographicDivision::Representation
collection :offices, as: 'offices', class: Google::Apis::CivicinfoV2::Office, decorator: Google::Apis::CivicinfoV2::Office::Representation
collection :officials, as: 'officials', class: Google::Apis::CivicinfoV2::Official, decorator: Google::Apis::CivicinfoV2::Official::Representation
end
end
# @private
class RepresentativeInfoResponse
class Representation < Google::Apis::Core::JsonRepresentation
hash :divisions, as: 'divisions', class: Google::Apis::CivicinfoV2::GeographicDivision, decorator: Google::Apis::CivicinfoV2::GeographicDivision::Representation
property :kind, as: 'kind'
property :normalized_input, as: 'normalizedInput', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
collection :offices, as: 'offices', class: Google::Apis::CivicinfoV2::Office, decorator: Google::Apis::CivicinfoV2::Office::Representation
collection :officials, as: 'officials', class: Google::Apis::CivicinfoV2::Official, decorator: Google::Apis::CivicinfoV2::Official::Representation
end
end
# @private
class SimpleAddressType
class Representation < Google::Apis::Core::JsonRepresentation
property :city, as: 'city'
property :line1, as: 'line1'
property :line2, as: 'line2'
property :line3, as: 'line3'
property :location_name, as: 'locationName'
property :state, as: 'state'
property :zip, as: 'zip'
end
end
# @private
class Source
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :official, as: 'official'
end
end
# @private
class VoterInfoResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :contests, as: 'contests', class: Google::Apis::CivicinfoV2::Contest, decorator: Google::Apis::CivicinfoV2::Contest::Representation
collection :drop_off_locations, as: 'dropOffLocations', class: Google::Apis::CivicinfoV2::PollingLocation, decorator: Google::Apis::CivicinfoV2::PollingLocation::Representation
collection :early_vote_sites, as: 'earlyVoteSites', class: Google::Apis::CivicinfoV2::PollingLocation, decorator: Google::Apis::CivicinfoV2::PollingLocation::Representation
property :election, as: 'election', class: Google::Apis::CivicinfoV2::Election, decorator: Google::Apis::CivicinfoV2::Election::Representation
property :kind, as: 'kind'
property :normalized_input, as: 'normalizedInput', class: Google::Apis::CivicinfoV2::SimpleAddressType, decorator: Google::Apis::CivicinfoV2::SimpleAddressType::Representation
collection :other_elections, as: 'otherElections', class: Google::Apis::CivicinfoV2::Election, decorator: Google::Apis::CivicinfoV2::Election::Representation
collection :polling_locations, as: 'pollingLocations', class: Google::Apis::CivicinfoV2::PollingLocation, decorator: Google::Apis::CivicinfoV2::PollingLocation::Representation
property :precinct_id, as: 'precinctId'
collection :state, as: 'state', class: Google::Apis::CivicinfoV2::AdministrationRegion, decorator: Google::Apis::CivicinfoV2::AdministrationRegion::Representation
end
end
end
end
end

View File

@ -1,284 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CivicinfoV2
# Google Civic Information API
#
# An API for accessing civic information.
#
# @example
# require 'google/apis/civicinfo_v2'
#
# Civicinfo = Google::Apis::CivicinfoV2 # Alias the module
# service = Civicinfo::CivicInfoService.new
#
# @see https://developers.google.com/civic-information
class CivicInfoService < 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/', 'civicinfo/v2/')
end
# Searches for political divisions by their natural name or OCD ID.
# @param [String] query
# The search query. Queries can cover any parts of a OCD ID or a human readable
# division name. All words given in the query are treated as required patterns.
# In addition to that, most query operators of the Apache Lucene library are
# supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CivicinfoV2::SearchDivisionResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::SearchDivisionResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_divisions(query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'divisions'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::SearchDivisionResponse::Representation
command.response_class = Google::Apis::CivicinfoV2::SearchDivisionResponse
command.query['query'] = query unless query.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 of available elections to query.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CivicinfoV2::QueryElectionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::QueryElectionsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def query_election(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'elections'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::QueryElectionsResponse::Representation
command.response_class = Google::Apis::CivicinfoV2::QueryElectionsResponse
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
# Looks up information relevant to a voter based on the voter's registered
# address.
# @param [String] address
# The registered address of the voter to look up.
# @param [String] election_id
# The unique ID of the election to look up. A list of election IDs can be
# obtained at https://www.googleapis.com/civicinfo/`version`/elections
# @param [Boolean] official_only
# If set to true, only data from official state sources will 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.
# 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::CivicinfoV2::VoterInfoResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::VoterInfoResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def query_voter_info(address: nil, election_id: nil, official_only: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'voterinfo'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::VoterInfoResponse::Representation
command.response_class = Google::Apis::CivicinfoV2::VoterInfoResponse
command.query['address'] = address unless address.nil?
command.query['electionId'] = election_id unless election_id.nil?
command.query['officialOnly'] = official_only unless official_only.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
# Looks up political geography and representative information for a single
# address.
# @param [String] address
# The address to look up. May only be specified if the field ocdId is not given
# in the URL.
# @param [Boolean] include_offices
# Whether to return information about offices and officials. If false, only the
# top-level district information will be returned.
# @param [Array<String>, String] levels
# A list of office levels to filter by. Only offices that serve at least one of
# these levels will be returned. Divisions that don't contain a matching office
# will not be returned.
# @param [Array<String>, String] roles
# A list of office roles to filter by. Only offices fulfilling one of these
# roles will be returned. Divisions that don't contain a matching office will
# not 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.
# 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::CivicinfoV2::RepresentativeInfoResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::RepresentativeInfoResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def representative_info_by_address(address: nil, include_offices: nil, levels: nil, roles: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'representatives'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::RepresentativeInfoResponse::Representation
command.response_class = Google::Apis::CivicinfoV2::RepresentativeInfoResponse
command.query['address'] = address unless address.nil?
command.query['includeOffices'] = include_offices unless include_offices.nil?
command.query['levels'] = levels unless levels.nil?
command.query['roles'] = roles unless roles.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
# Looks up representative information for a single geographic division.
# @param [String] ocd_id
# The Open Civic Data division identifier of the division to look up.
# @param [Array<String>, String] levels
# A list of office levels to filter by. Only offices that serve at least one of
# these levels will be returned. Divisions that don't contain a matching office
# will not be returned.
# @param [Boolean] recursive
# If true, information about all divisions contained in the division requested
# will be included as well. For example, if querying ocd-division/country:us/
# district:dc, this would also return all DC's wards and ANCs.
# @param [Array<String>, String] roles
# A list of office roles to filter by. Only offices fulfilling one of these
# roles will be returned. Divisions that don't contain a matching office will
# not 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.
# 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::CivicinfoV2::RepresentativeInfoData] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CivicinfoV2::RepresentativeInfoData]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def representative_info_by_division(ocd_id, levels: nil, recursive: nil, roles: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'representatives/{ocdId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CivicinfoV2::RepresentativeInfoData::Representation
command.response_class = Google::Apis::CivicinfoV2::RepresentativeInfoData
command.params['ocdId'] = ocd_id unless ocd_id.nil?
command.query['levels'] = levels unless levels.nil?
command.query['recursive'] = recursive unless recursive.nil?
command.query['roles'] = roles unless roles.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

View File

@ -1,34 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/cloudlatencytest_v2/service.rb'
require 'google/apis/cloudlatencytest_v2/classes.rb'
require 'google/apis/cloudlatencytest_v2/representations.rb'
module Google
module Apis
# Google Cloud Network Performance Monitoring API
#
# A Test API to report latency data.
#
# @see
module CloudlatencytestV2
VERSION = 'V2'
REVISION = '20150206'
# View monitoring data for all of your Google Cloud and API projects
AUTH_MONITORING_READONLY = 'https://www.googleapis.com/auth/monitoring.readonly'
end
end
end

View File

@ -1,160 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudlatencytestV2
#
class AggregatedStats
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `stats`
# @return [Array<Google::Apis::CloudlatencytestV2::Stats>]
attr_accessor :stats
def initialize(**args)
@stats = args[:stats] unless args[:stats].nil?
end
end
#
class AggregatedStatsReply
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `testValue`
# @return [String]
attr_accessor :test_value
def initialize(**args)
@test_value = args[:test_value] unless args[:test_value].nil?
end
end
#
class DoubleValue
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
#
# Corresponds to the JSON property `value`
# @return [Float]
attr_accessor :value
def initialize(**args)
@label = args[:label] unless args[:label].nil?
@value = args[:value] unless args[:value].nil?
end
end
#
class IntValue
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
#
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
@label = args[:label] unless args[:label].nil?
@value = args[:value] unless args[:value].nil?
end
end
#
class Stats
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `doubleValues`
# @return [Array<Google::Apis::CloudlatencytestV2::DoubleValue>]
attr_accessor :double_values
#
# Corresponds to the JSON property `intValues`
# @return [Array<Google::Apis::CloudlatencytestV2::IntValue>]
attr_accessor :int_values
#
# Corresponds to the JSON property `stringValues`
# @return [Array<Google::Apis::CloudlatencytestV2::StringValue>]
attr_accessor :string_values
#
# Corresponds to the JSON property `time`
# @return [Float]
attr_accessor :time
def initialize(**args)
@double_values = args[:double_values] unless args[:double_values].nil?
@int_values = args[:int_values] unless args[:int_values].nil?
@string_values = args[:string_values] unless args[:string_values].nil?
@time = args[:time] unless args[:time].nil?
end
end
#
class StatsReply
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `testValue`
# @return [String]
attr_accessor :test_value
def initialize(**args)
@test_value = args[:test_value] unless args[:test_value].nil?
end
end
#
class StringValue
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
#
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
@label = args[:label] unless args[:label].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
end
end

View File

@ -1,80 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudlatencytestV2
class AggregatedStatsRepresentation < Google::Apis::Core::JsonRepresentation; end
class AggregatedStatsReplyRepresentation < Google::Apis::Core::JsonRepresentation; end
class DoubleValueRepresentation < Google::Apis::Core::JsonRepresentation; end
class IntValueRepresentation < Google::Apis::Core::JsonRepresentation; end
class StatsRepresentation < Google::Apis::Core::JsonRepresentation; end
class StatsReplyRepresentation < Google::Apis::Core::JsonRepresentation; end
class StringValueRepresentation < Google::Apis::Core::JsonRepresentation; end
# @private
class AggregatedStatsRepresentation < Google::Apis::Core::JsonRepresentation
collection :stats, as: 'stats', class: Google::Apis::CloudlatencytestV2::Stats, decorator: Google::Apis::CloudlatencytestV2::StatsRepresentation
end
# @private
class AggregatedStatsReplyRepresentation < Google::Apis::Core::JsonRepresentation
property :test_value, as: 'testValue'
end
# @private
class DoubleValueRepresentation < Google::Apis::Core::JsonRepresentation
property :label, as: 'label'
property :value, as: 'value'
end
# @private
class IntValueRepresentation < Google::Apis::Core::JsonRepresentation
property :label, as: 'label'
property :value, as: 'value'
end
# @private
class StatsRepresentation < Google::Apis::Core::JsonRepresentation
collection :double_values, as: 'doubleValues', class: Google::Apis::CloudlatencytestV2::DoubleValue, decorator: Google::Apis::CloudlatencytestV2::DoubleValueRepresentation
collection :int_values, as: 'intValues', class: Google::Apis::CloudlatencytestV2::IntValue, decorator: Google::Apis::CloudlatencytestV2::IntValueRepresentation
collection :string_values, as: 'stringValues', class: Google::Apis::CloudlatencytestV2::StringValue, decorator: Google::Apis::CloudlatencytestV2::StringValueRepresentation
property :time, as: 'time'
end
# @private
class StatsReplyRepresentation < Google::Apis::Core::JsonRepresentation
property :test_value, as: 'testValue'
end
# @private
class StringValueRepresentation < Google::Apis::Core::JsonRepresentation
property :label, as: 'label'
property :value, as: 'value'
end
end
end
end

View File

@ -1,141 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudlatencytestV2
# Google Cloud Network Performance Monitoring API
#
# A Test API to report latency data.
#
# @example
# require 'google/apis/cloudlatencytest_v2'
#
# Cloudlatencytest = Google::Apis::CloudlatencytestV2 # Alias the module
# service = Cloudlatencytest::CloudlatencytestService.new
#
# @see
class CloudlatencytestService < 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://cloudlatencytest-pa.googleapis.com/', 'v2/statscollection/')
end
# RPC to update the new TCP stats.
# @param [Google::Apis::CloudlatencytestV2::AggregatedStats] aggregated_stats_obj
#
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::Api::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudlatencytestV2::AggregatedStatsReply] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudlatencytestV2::AggregatedStatsReply]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def updateaggregatedstats_statscollection(aggregated_stats_obj, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'updateaggregatedstats'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudlatencytestV2::AggregatedStatsRepresentation
command.request_object = aggregated_stats_obj
command.response_representation = Google::Apis::CloudlatencytestV2::AggregatedStatsReplyRepresentation
command.response_class = Google::Apis::CloudlatencytestV2::AggregatedStatsReply
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
# RPC to update the new TCP stats.
# @param [Google::Apis::CloudlatencytestV2::Stats] stats_obj
#
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::Api::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudlatencytestV2::StatsReply] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudlatencytestV2::StatsReply]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def updatestats_statscollection(stats_obj, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'updatestats'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudlatencytestV2::StatsRepresentation
command.request_object = stats_obj
command.response_representation = Google::Apis::CloudlatencytestV2::StatsReplyRepresentation
command.response_class = Google::Apis::CloudlatencytestV2::StatsReply
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

View File

@ -1,34 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/cloudmonitoring_v2beta2/service.rb'
require 'google/apis/cloudmonitoring_v2beta2/classes.rb'
require 'google/apis/cloudmonitoring_v2beta2/representations.rb'
module Google
module Apis
# Cloud Monitoring API
#
# API for accessing Google Cloud and API monitoring data.
#
# @see https://cloud.google.com/monitoring/v2beta2/
module CloudmonitoringV2beta2
VERSION = 'V2beta2'
REVISION = '20150616'
# View and write monitoring data for all of your Google and third-party Cloud and API projects
AUTH_MONITORING = 'https://www.googleapis.com/auth/monitoring'
end
end
end

View File

@ -1,679 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudmonitoringV2beta2
# The response of cloudmonitoring.metricDescriptors.delete.
class DeleteMetricDescriptorResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#deleteMetricDescriptorResponse".
# 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)
@kind = args[:kind] unless args[:kind].nil?
end
end
# The request of cloudmonitoring.metricDescriptors.list.
class ListMetricDescriptorsRequest
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listMetricDescriptorsRequest".
# 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)
@kind = args[:kind] unless args[:kind].nil?
end
end
# The response of cloudmonitoring.metricDescriptors.list.
class ListMetricDescriptorsResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listMetricDescriptorsResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The returned metric descriptors.
# Corresponds to the JSON property `metrics`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::MetricDescriptor>]
attr_accessor :metrics
# Pagination token. If present, indicates that additional results are available
# for retrieval. To access the results past the pagination limit, pass this
# value to the pageToken query parameter.
# 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)
@kind = args[:kind] unless args[:kind].nil?
@metrics = args[:metrics] unless args[:metrics].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# The request of cloudmonitoring.timeseriesDescriptors.list
class ListTimeseriesDescriptorsRequest
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listTimeseriesDescriptorsRequest".
# 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)
@kind = args[:kind] unless args[:kind].nil?
end
end
# The response of cloudmonitoring.timeseriesDescriptors.list
class ListTimeseriesDescriptorsResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listTimeseriesDescriptorsResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Pagination token. If present, indicates that additional results are available
# for retrieval. To access the results past the pagination limit, set this value
# to the pageToken query parameter.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The oldest timestamp of the interval of this query, as an RFC 3339 string.
# Corresponds to the JSON property `oldest`
# @return [DateTime]
attr_accessor :oldest
# The returned time series descriptors.
# Corresponds to the JSON property `timeseries`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor>]
attr_accessor :timeseries
# The youngest timestamp of the interval of this query, as an RFC 3339 string.
# Corresponds to the JSON property `youngest`
# @return [DateTime]
attr_accessor :youngest
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@oldest = args[:oldest] unless args[:oldest].nil?
@timeseries = args[:timeseries] unless args[:timeseries].nil?
@youngest = args[:youngest] unless args[:youngest].nil?
end
end
# The request of cloudmonitoring.timeseries.list
class ListTimeseriesRequest
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listTimeseriesRequest".
# 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)
@kind = args[:kind] unless args[:kind].nil?
end
end
# The response of cloudmonitoring.timeseries.list
class ListTimeseriesResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#listTimeseriesResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Pagination token. If present, indicates that additional results are available
# for retrieval. To access the results past the pagination limit, set the
# pageToken query parameter to this value. All of the points of a time series
# will be returned before returning any point of the subsequent time series.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The oldest timestamp of the interval of this query as an RFC 3339 string.
# Corresponds to the JSON property `oldest`
# @return [DateTime]
attr_accessor :oldest
# The returned time series.
# Corresponds to the JSON property `timeseries`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::Timeseries>]
attr_accessor :timeseries
# The youngest timestamp of the interval of this query as an RFC 3339 string.
# Corresponds to the JSON property `youngest`
# @return [DateTime]
attr_accessor :youngest
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@oldest = args[:oldest] unless args[:oldest].nil?
@timeseries = args[:timeseries] unless args[:timeseries].nil?
@youngest = args[:youngest] unless args[:youngest].nil?
end
end
# A metricDescriptor defines the name, label keys, and data type of a particular
# metric.
class MetricDescriptor
include Google::Apis::Core::Hashable
# Description of this metric.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Labels defined for this metric.
# Corresponds to the JSON property `labels`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor>]
attr_accessor :labels
# The name of this metric.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The project ID to which the metric belongs.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# A type in a metric contains information about how the metric is collected and
# what its data points look like.
# Corresponds to the JSON property `typeDescriptor`
# @return [Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor]
attr_accessor :type_descriptor
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] unless args[:description].nil?
@labels = args[:labels] unless args[:labels].nil?
@name = args[:name] unless args[:name].nil?
@project = args[:project] unless args[:project].nil?
@type_descriptor = args[:type_descriptor] unless args[:type_descriptor].nil?
end
end
# A label in a metric is a description of this metric, including the key of this
# description (what the description is), and the value for this description.
class MetricDescriptorLabelDescriptor
include Google::Apis::Core::Hashable
# Label description.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Label key.
# 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)
@description = args[:description] unless args[:description].nil?
@key = args[:key] unless args[:key].nil?
end
end
# A type in a metric contains information about how the metric is collected and
# what its data points look like.
class MetricDescriptorTypeDescriptor
include Google::Apis::Core::Hashable
# The method of collecting data for the metric. See Metric types.
# Corresponds to the JSON property `metricType`
# @return [String]
attr_accessor :metric_type
# The data type of of individual points in the metric's time series. See Metric
# value types.
# Corresponds to the JSON property `valueType`
# @return [String]
attr_accessor :value_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metric_type = args[:metric_type] unless args[:metric_type].nil?
@value_type = args[:value_type] unless args[:value_type].nil?
end
end
# Point is a single point in a time series. It consists of a start time, an end
# time, and a value.
class Point
include Google::Apis::Core::Hashable
# The value of this data point. Either "true" or "false".
# Corresponds to the JSON property `boolValue`
# @return [Boolean]
attr_accessor :bool_value
alias_method :bool_value?, :bool_value
# Distribution data point value type. When writing distribution points, try to
# be consistent with the boundaries of your buckets. If you must modify the
# bucket boundaries, then do so by merging, partitioning, or appending rather
# than skewing them.
# Corresponds to the JSON property `distributionValue`
# @return [Google::Apis::CloudmonitoringV2beta2::PointDistribution]
attr_accessor :distribution_value
# The value of this data point as a double-precision floating-point number.
# Corresponds to the JSON property `doubleValue`
# @return [Float]
attr_accessor :double_value
# The interval [start, end] is the time period to which the point's value
# applies. For gauge metrics, whose values are instantaneous measurements, this
# interval should be empty (start should equal end). For cumulative metrics (of
# which deltas and rates are special cases), the interval should be non-empty.
# Both start and end are RFC 3339 strings.
# Corresponds to the JSON property `end`
# @return [DateTime]
attr_accessor :end
# The value of this data point as a 64-bit integer.
# Corresponds to the JSON property `int64Value`
# @return [String]
attr_accessor :int64_value
# The interval [start, end] is the time period to which the point's value
# applies. For gauge metrics, whose values are instantaneous measurements, this
# interval should be empty (start should equal end). For cumulative metrics (of
# which deltas and rates are special cases), the interval should be non-empty.
# Both start and end are RFC 3339 strings.
# Corresponds to the JSON property `start`
# @return [DateTime]
attr_accessor :start
# The value of this data point in string format.
# Corresponds to the JSON property `stringValue`
# @return [String]
attr_accessor :string_value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bool_value = args[:bool_value] unless args[:bool_value].nil?
@distribution_value = args[:distribution_value] unless args[:distribution_value].nil?
@double_value = args[:double_value] unless args[:double_value].nil?
@end = args[:end] unless args[:end].nil?
@int64_value = args[:int64_value] unless args[:int64_value].nil?
@start = args[:start] unless args[:start].nil?
@string_value = args[:string_value] unless args[:string_value].nil?
end
end
# Distribution data point value type. When writing distribution points, try to
# be consistent with the boundaries of your buckets. If you must modify the
# bucket boundaries, then do so by merging, partitioning, or appending rather
# than skewing them.
class PointDistribution
include Google::Apis::Core::Hashable
# The finite buckets.
# Corresponds to the JSON property `buckets`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket>]
attr_accessor :buckets
# The overflow bucket is a special bucket that does not have the upperBound
# field; it includes all of the events that are no less than its lower bound.
# Corresponds to the JSON property `overflowBucket`
# @return [Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket]
attr_accessor :overflow_bucket
# The underflow bucket is a special bucket that does not have the lowerBound
# field; it includes all of the events that are less than its upper bound.
# Corresponds to the JSON property `underflowBucket`
# @return [Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket]
attr_accessor :underflow_bucket
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@buckets = args[:buckets] unless args[:buckets].nil?
@overflow_bucket = args[:overflow_bucket] unless args[:overflow_bucket].nil?
@underflow_bucket = args[:underflow_bucket] unless args[:underflow_bucket].nil?
end
end
# The histogram's bucket. Buckets that form the histogram of a distribution
# value. If the upper bound of a bucket, say U1, does not equal the lower bound
# of the next bucket, say L2, this means that there is no event in [U1, L2).
class PointDistributionBucket
include Google::Apis::Core::Hashable
# The number of events whose values are in the interval defined by this bucket.
# Corresponds to the JSON property `count`
# @return [String]
attr_accessor :count
# The lower bound of the value interval of this bucket (inclusive).
# Corresponds to the JSON property `lowerBound`
# @return [Float]
attr_accessor :lower_bound
# The upper bound of the value interval of this bucket (exclusive).
# Corresponds to the JSON property `upperBound`
# @return [Float]
attr_accessor :upper_bound
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] unless args[:count].nil?
@lower_bound = args[:lower_bound] unless args[:lower_bound].nil?
@upper_bound = args[:upper_bound] unless args[:upper_bound].nil?
end
end
# The overflow bucket is a special bucket that does not have the upperBound
# field; it includes all of the events that are no less than its lower bound.
class PointDistributionOverflowBucket
include Google::Apis::Core::Hashable
# The number of events whose values are in the interval defined by this bucket.
# Corresponds to the JSON property `count`
# @return [String]
attr_accessor :count
# The lower bound of the value interval of this bucket (inclusive).
# Corresponds to the JSON property `lowerBound`
# @return [Float]
attr_accessor :lower_bound
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] unless args[:count].nil?
@lower_bound = args[:lower_bound] unless args[:lower_bound].nil?
end
end
# The underflow bucket is a special bucket that does not have the lowerBound
# field; it includes all of the events that are less than its upper bound.
class PointDistributionUnderflowBucket
include Google::Apis::Core::Hashable
# The number of events whose values are in the interval defined by this bucket.
# Corresponds to the JSON property `count`
# @return [String]
attr_accessor :count
# The upper bound of the value interval of this bucket (exclusive).
# Corresponds to the JSON property `upperBound`
# @return [Float]
attr_accessor :upper_bound
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] unless args[:count].nil?
@upper_bound = args[:upper_bound] unless args[:upper_bound].nil?
end
end
# The monitoring data is organized as metrics and stored as data points that are
# recorded over time. Each data point represents information like the CPU
# utilization of your virtual machine. A historical record of these data points
# is called a time series.
class Timeseries
include Google::Apis::Core::Hashable
# The data points of this time series. The points are listed in order of their
# end timestamp, from younger to older.
# Corresponds to the JSON property `points`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::Point>]
attr_accessor :points
# TimeseriesDescriptor identifies a single time series.
# Corresponds to the JSON property `timeseriesDesc`
# @return [Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor]
attr_accessor :timeseries_desc
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@points = args[:points] unless args[:points].nil?
@timeseries_desc = args[:timeseries_desc] unless args[:timeseries_desc].nil?
end
end
# TimeseriesDescriptor identifies a single time series.
class TimeseriesDescriptor
include Google::Apis::Core::Hashable
# The label's name.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# The name of the metric.
# Corresponds to the JSON property `metric`
# @return [String]
attr_accessor :metric
# The Developers Console project number to which this time series belongs.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@labels = args[:labels] unless args[:labels].nil?
@metric = args[:metric] unless args[:metric].nil?
@project = args[:project] unless args[:project].nil?
end
end
#
class TimeseriesDescriptorLabel
include Google::Apis::Core::Hashable
# The label's name.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# The label's value.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] unless args[:key].nil?
@value = args[:value] unless args[:value].nil?
end
end
# When writing time series, TimeseriesPoint should be used instead of Timeseries,
# to enforce single point for each time series in the timeseries.write request.
class TimeseriesPoint
include Google::Apis::Core::Hashable
# Point is a single point in a time series. It consists of a start time, an end
# time, and a value.
# Corresponds to the JSON property `point`
# @return [Google::Apis::CloudmonitoringV2beta2::Point]
attr_accessor :point
# TimeseriesDescriptor identifies a single time series.
# Corresponds to the JSON property `timeseriesDesc`
# @return [Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor]
attr_accessor :timeseries_desc
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@point = args[:point] unless args[:point].nil?
@timeseries_desc = args[:timeseries_desc] unless args[:timeseries_desc].nil?
end
end
# The request of cloudmonitoring.timeseries.write
class WriteTimeseriesRequest
include Google::Apis::Core::Hashable
# The label's name.
# Corresponds to the JSON property `commonLabels`
# @return [Hash<String,String>]
attr_accessor :common_labels
# Provide time series specific labels and the data points for each time series.
# The labels in timeseries and the common_labels should form a complete list of
# labels that required by the metric.
# Corresponds to the JSON property `timeseries`
# @return [Array<Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint>]
attr_accessor :timeseries
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@common_labels = args[:common_labels] unless args[:common_labels].nil?
@timeseries = args[:timeseries] unless args[:timeseries].nil?
end
end
# The response of cloudmonitoring.timeseries.write
class WriteTimeseriesResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "
# cloudmonitoring#writeTimeseriesResponse".
# 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)
@kind = args[:kind] unless args[:kind].nil?
end
end
end
end
end

View File

@ -1,311 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudmonitoringV2beta2
class DeleteMetricDescriptorResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListMetricDescriptorsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListMetricDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTimeseriesDescriptorsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTimeseriesDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTimeseriesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTimeseriesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MetricDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MetricDescriptorLabelDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MetricDescriptorTypeDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Point
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PointDistribution
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PointDistributionBucket
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PointDistributionOverflowBucket
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class PointDistributionUnderflowBucket
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Timeseries
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TimeseriesDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TimeseriesDescriptorLabel
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TimeseriesPoint
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class WriteTimeseriesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class WriteTimeseriesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class DeleteMetricDescriptorResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
# @private
class ListMetricDescriptorsRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
# @private
class ListMetricDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :metrics, as: 'metrics', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class ListTimeseriesDescriptorsRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
# @private
class ListTimeseriesDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :oldest, as: 'oldest', type: DateTime
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
property :youngest, as: 'youngest', type: DateTime
end
end
# @private
class ListTimeseriesRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
# @private
class ListTimeseriesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :oldest, as: 'oldest', type: DateTime
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::Timeseries, decorator: Google::Apis::CloudmonitoringV2beta2::Timeseries::Representation
property :youngest, as: 'youngest', type: DateTime
end
end
# @private
class MetricDescriptor
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
collection :labels, as: 'labels', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor::Representation
property :name, as: 'name'
property :project, as: 'project'
property :type_descriptor, as: 'typeDescriptor', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor::Representation
end
end
# @private
class MetricDescriptorLabelDescriptor
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :key, as: 'key'
end
end
# @private
class MetricDescriptorTypeDescriptor
class Representation < Google::Apis::Core::JsonRepresentation
property :metric_type, as: 'metricType'
property :value_type, as: 'valueType'
end
end
# @private
class Point
class Representation < Google::Apis::Core::JsonRepresentation
property :bool_value, as: 'boolValue'
property :distribution_value, as: 'distributionValue', class: Google::Apis::CloudmonitoringV2beta2::PointDistribution, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistribution::Representation
property :double_value, as: 'doubleValue'
property :end, as: 'end', type: DateTime
property :int64_value, as: 'int64Value'
property :start, as: 'start', type: DateTime
property :string_value, as: 'stringValue'
end
end
# @private
class PointDistribution
class Representation < Google::Apis::Core::JsonRepresentation
collection :buckets, as: 'buckets', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket::Representation
property :overflow_bucket, as: 'overflowBucket', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket::Representation
property :underflow_bucket, as: 'underflowBucket', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket::Representation
end
end
# @private
class PointDistributionBucket
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :lower_bound, as: 'lowerBound'
property :upper_bound, as: 'upperBound'
end
end
# @private
class PointDistributionOverflowBucket
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :lower_bound, as: 'lowerBound'
end
end
# @private
class PointDistributionUnderflowBucket
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :upper_bound, as: 'upperBound'
end
end
# @private
class Timeseries
class Representation < Google::Apis::Core::JsonRepresentation
collection :points, as: 'points', class: Google::Apis::CloudmonitoringV2beta2::Point, decorator: Google::Apis::CloudmonitoringV2beta2::Point::Representation
property :timeseries_desc, as: 'timeseriesDesc', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
end
end
# @private
class TimeseriesDescriptor
class Representation < Google::Apis::Core::JsonRepresentation
hash :labels, as: 'labels'
property :metric, as: 'metric'
property :project, as: 'project'
end
end
# @private
class TimeseriesDescriptorLabel
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
# @private
class TimeseriesPoint
class Representation < Google::Apis::Core::JsonRepresentation
property :point, as: 'point', class: Google::Apis::CloudmonitoringV2beta2::Point, decorator: Google::Apis::CloudmonitoringV2beta2::Point::Representation
property :timeseries_desc, as: 'timeseriesDesc', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
end
end
# @private
class WriteTimeseriesRequest
class Representation < Google::Apis::Core::JsonRepresentation
hash :common_labels, as: 'commonLabels'
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint::Representation
end
end
# @private
class WriteTimeseriesResponse
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
end
end
end
end
end

View File

@ -1,458 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudmonitoringV2beta2
# Cloud Monitoring API
#
# API for accessing Google Cloud and API monitoring data.
#
# @example
# require 'google/apis/cloudmonitoring_v2beta2'
#
# Cloudmonitoring = Google::Apis::CloudmonitoringV2beta2 # Alias the module
# service = Cloudmonitoring::CloudMonitoringService.new
#
# @see https://cloud.google.com/monitoring/v2beta2/
class CloudMonitoringService < 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/', 'cloudmonitoring/v2beta2/projects/')
end
# Create a new metric.
# @param [String] project
# The project id. The value can be the numeric project ID or string-based
# project name.
# @param [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor] metric_descriptor_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# 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::CloudmonitoringV2beta2::MetricDescriptor] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metric_descriptor(project, metric_descriptor_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/metricDescriptors'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
command.request_object = metric_descriptor_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor
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
# Delete an existing metric.
# @param [String] project
# The project ID to which the metric belongs.
# @param [String] metric
# Name of the metric.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metric_descriptor(project, metric, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/metricDescriptors/{metric}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse
command.params['project'] = project unless project.nil?
command.params['metric'] = metric unless metric.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 metric descriptors that match the query. If the query is not set, then
# all of the metric descriptors will be returned. Large responses will be
# paginated, use the nextPageToken returned in the response to request
# subsequent pages of results by setting the pageToken query parameter to the
# value of the nextPageToken.
# @param [String] project
# The project id. The value can be the numeric project ID or string-based
# project name.
# @param [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest] list_metric_descriptors_request_object
# @param [Fixnum] count
# Maximum number of metric descriptors per page. Used for pagination. If not
# specified, count = 100.
# @param [String] page_token
# The pagination token, which is used to page through large result sets. Set
# this value to the value of the nextPageToken to retrieve the next page of
# results.
# @param [String] query
# The query used to search against existing metrics. Separate keywords with a
# space; the service joins all keywords with AND, meaning that all keywords must
# match for a metric to be returned. If this field is omitted, all metrics are
# returned. If an empty string is passed with this field, no metrics 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::CloudmonitoringV2beta2::ListMetricDescriptorsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metric_descriptors(project, list_metric_descriptors_request_object = nil, count: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/metricDescriptors'
command = make_simple_command(:get, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest::Representation
command.request_object = list_metric_descriptors_request_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse
command.params['project'] = project unless project.nil?
command.query['count'] = count unless count.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['query'] = query unless query.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 data points of the time series that match the metric and labels
# values and that have data points in the interval. Large responses are
# paginated; use the nextPageToken returned in the response to request
# subsequent pages of results by setting the pageToken query parameter to the
# value of the nextPageToken.
# @param [String] project
# The project ID to which this time series belongs. The value can be the numeric
# project ID or string-based project name.
# @param [String] metric
# Metric names are protocol-free URLs as listed in the Supported Metrics page.
# For example, compute.googleapis.com/instance/disk/read_ops_count.
# @param [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest] list_timeseries_request_object
# @param [String] aggregator
# The aggregation function that will reduce the data points in each window to a
# single point. This parameter is only valid for non-cumulative metrics with a
# value type of INT64 or DOUBLE.
# @param [Fixnum] count
# Maximum number of data points per page, which is used for pagination of
# results.
# @param [Array<String>, String] labels
# A collection of labels for the matching time series, which are represented as:
#
# - key==value: key equals the value
# - key=~value: key regex matches the value
# - key!=value: key does not equal the value
# - key!~value: key regex does not match the value For example, to list all of
# the time series descriptors for the region us-central1, you could specify:
# label=cloud.googleapis.com%2Flocation=~us-central1.*
# @param [String] oldest
# Start of the time interval (exclusive), which is expressed as an RFC 3339
# timestamp. If neither oldest nor timespan is specified, the default time
# interval will be (youngest - 4 hours, youngest]
# @param [String] page_token
# The pagination token, which is used to page through large result sets. Set
# this value to the value of the nextPageToken to retrieve the next page of
# results.
# @param [String] timespan
# Length of the time interval to query, which is an alternative way to declare
# the interval: (youngest - timespan, youngest]. The timespan and oldest
# parameters should not be used together. Units:
# - s: second
# - m: minute
# - h: hour
# - d: day
# - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d
# is not allowed; you should use 17d instead.
# If neither oldest nor timespan is specified, the default time interval will be
# (youngest - 4 hours, youngest].
# @param [String] window
# The sampling window. At most one data point will be returned for each window
# in the requested time interval. This parameter is only valid for non-
# cumulative metric types. Units:
# - m: minute
# - h: hour
# - d: day
# - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is
# not allowed; you should use 17d instead.
# @param [String] youngest
# End of the time interval (inclusive), which is expressed as an RFC 3339
# timestamp.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CloudmonitoringV2beta2::ListTimeseriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeseries(project, metric, list_timeseries_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, youngest: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/timeseries/{metric}'
command = make_simple_command(:get, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest::Representation
command.request_object = list_timeseries_request_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse
command.params['project'] = project unless project.nil?
command.params['metric'] = metric unless metric.nil?
command.query['aggregator'] = aggregator unless aggregator.nil?
command.query['count'] = count unless count.nil?
command.query['labels'] = labels unless labels.nil?
command.query['oldest'] = oldest unless oldest.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['timespan'] = timespan unless timespan.nil?
command.query['window'] = window unless window.nil?
command.query['youngest'] = youngest unless youngest.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
# Put data points to one or more time series for one or more metrics. If a time
# series does not exist, a new time series will be created. It is not allowed to
# write a time series point that is older than the existing youngest point of
# that time series. Points that are older than the existing youngest point of
# that time series will be discarded silently. Therefore, users should make sure
# that points of a time series are written sequentially in the order of their
# end time.
# @param [String] project
# The project ID. The value can be the numeric project ID or string-based
# project name.
# @param [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest] write_timeseries_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::CloudmonitoringV2beta2::WriteTimeseriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def write_timeseries(project, write_timeseries_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/timeseries:write'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest::Representation
command.request_object = write_timeseries_request_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse
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
# List the descriptors of the time series that match the metric and labels
# values and that have data points in the interval. Large responses are
# paginated; use the nextPageToken returned in the response to request
# subsequent pages of results by setting the pageToken query parameter to the
# value of the nextPageToken.
# @param [String] project
# The project ID to which this time series belongs. The value can be the numeric
# project ID or string-based project name.
# @param [String] metric
# Metric names are protocol-free URLs as listed in the Supported Metrics page.
# For example, compute.googleapis.com/instance/disk/read_ops_count.
# @param [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest] list_timeseries_descriptors_request_object
# @param [String] aggregator
# The aggregation function that will reduce the data points in each window to a
# single point. This parameter is only valid for non-cumulative metrics with a
# value type of INT64 or DOUBLE.
# @param [Fixnum] count
# Maximum number of time series descriptors per page. Used for pagination. If
# not specified, count = 100.
# @param [Array<String>, String] labels
# A collection of labels for the matching time series, which are represented as:
#
# - key==value: key equals the value
# - key=~value: key regex matches the value
# - key!=value: key does not equal the value
# - key!~value: key regex does not match the value For example, to list all of
# the time series descriptors for the region us-central1, you could specify:
# label=cloud.googleapis.com%2Flocation=~us-central1.*
# @param [String] oldest
# Start of the time interval (exclusive), which is expressed as an RFC 3339
# timestamp. If neither oldest nor timespan is specified, the default time
# interval will be (youngest - 4 hours, youngest]
# @param [String] page_token
# The pagination token, which is used to page through large result sets. Set
# this value to the value of the nextPageToken to retrieve the next page of
# results.
# @param [String] timespan
# Length of the time interval to query, which is an alternative way to declare
# the interval: (youngest - timespan, youngest]. The timespan and oldest
# parameters should not be used together. Units:
# - s: second
# - m: minute
# - h: hour
# - d: day
# - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d
# is not allowed; you should use 17d instead.
# If neither oldest nor timespan is specified, the default time interval will be
# (youngest - 4 hours, youngest].
# @param [String] window
# The sampling window. At most one data point will be returned for each window
# in the requested time interval. This parameter is only valid for non-
# cumulative metric types. Units:
# - m: minute
# - h: hour
# - d: day
# - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is
# not allowed; you should use 17d instead.
# @param [String] youngest
# End of the time interval (inclusive), which is expressed as an RFC 3339
# timestamp.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeseries_descriptors(project, metric, list_timeseries_descriptors_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, youngest: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/timeseriesDescriptors/{metric}'
command = make_simple_command(:get, path, options)
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest::Representation
command.request_object = list_timeseries_descriptors_request_object
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse::Representation
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse
command.params['project'] = project unless project.nil?
command.params['metric'] = metric unless metric.nil?
command.query['aggregator'] = aggregator unless aggregator.nil?
command.query['count'] = count unless count.nil?
command.query['labels'] = labels unless labels.nil?
command.query['oldest'] = oldest unless oldest.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['timespan'] = timespan unless timespan.nil?
command.query['window'] = window unless window.nil?
command.query['youngest'] = youngest unless youngest.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

View File

@ -1,38 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/cloudresourcemanager_v1beta1/service.rb'
require 'google/apis/cloudresourcemanager_v1beta1/classes.rb'
require 'google/apis/cloudresourcemanager_v1beta1/representations.rb'
module Google
module Apis
# Google Cloud Resource Manager API
#
# The Google Cloud Resource Manager API provides methods for creating, reading,
# and updating of project metadata, including IAM policies, and will shortly
# provide the same for other high-level entities (e.g. customers and resource
# groups). Longer term, we expect the cloudresourcemanager API to encompass
# other Cloud resources as well.
#
# @see https://cloud.google.com/resource-manager
module CloudresourcemanagerV1beta1
VERSION = 'V1beta1'
REVISION = '20150603'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -1,139 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudresourcemanagerV1beta1
# A Project is a high-level Google Cloud Platform entity. It is a container for
# ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
# Projects are subordinate to Customers.
class Project
include Google::Apis::Core::Hashable
# The number uniquely identifying the project. Example: 415104041262. Read-only.
# Corresponds to the JSON property `projectNumber`
# @return [String]
attr_accessor :project_number
# The unique, user-assigned id of the project. It must be 6 to 30 lowercase
# letters, digits, or hyphens. It must start with a letter. Trailing hyphens are
# prohibited. Example: "tokyo-rain-123" Read-only after creation.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# The project lifecycle state. Read-only.
# Corresponds to the JSON property `lifecycleState`
# @return [String]
attr_accessor :lifecycle_state
# The user-assigned name of the project. This field is optional and can remain
# unset. Allowed characters are: lower- and upper-case letters, numbers, hyphen,
# single-quote, double-quotes, space, and exclamation point. Example: "My
# Project" Read-write.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Creation time. Read-only.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# The labels associated with this project. Label keys must be between 1 and 63
# characters long and must conform to the following regular expression: [a-z]([-
# a-z0-9]*[a-z0-9])?. Label values must be between 0 and 63 characters long and
# must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?. No more
# than 256 labels can be associated with a given resource. Note that additional
# character may be included in labels in the future. Clients should store labels
# in a representation such as JSON that does not depend on specific characters
# being disallowed. Example: "environment" : "dev" Read-write.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@project_number = args[:project_number] unless args[:project_number].nil?
@project_id = args[:project_id] unless args[:project_id].nil?
@lifecycle_state = args[:lifecycle_state] unless args[:lifecycle_state].nil?
@name = args[:name] unless args[:name].nil?
@create_time = args[:create_time] unless args[:create_time].nil?
@labels = args[:labels] unless args[:labels].nil?
end
end
# A page of the response received from the [ListProjects][cloudresourcemanager.
# projects.v1beta1.Projects.ListProjects] method. A paginated response where
# more pages are available has `next_page_token` set. This token can be used in
# a subsequent request to retrieve the next request page.
class ListProjectsResponse
include Google::Apis::Core::Hashable
# The list of projects that matched the list filter. This list can be paginated.
# Corresponds to the JSON property `projects`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Project>]
attr_accessor :projects
# Pagination token. If the result set is too large to fit in a single response,
# this token is returned. It encodes the position of the current result cursor.
# Feeding this value into a new list request with the `page_token` parameter
# gives the next page of the results. When `next_page_token` is not filled in,
# there is no next page and the list returned is the last page in the result set.
# Pagination tokens have a limited lifetime. Note: pagination is not yet
# supported; the server will not set this field.
# 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)
@projects = args[:projects] unless args[:projects].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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); `
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
end
end
end

View File

@ -1,65 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudresourcemanagerV1beta1
class Project
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListProjectsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Project
class Representation < Google::Apis::Core::JsonRepresentation
property :project_number, as: 'projectNumber'
property :project_id, as: 'projectId'
property :lifecycle_state, as: 'lifecycleState'
property :name, as: 'name'
property :create_time, as: 'createTime'
hash :labels, as: 'labels'
end
end
# @private
class ListProjectsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1beta1::Project, decorator: Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Empty
class Representation < Google::Apis::Core::JsonRepresentation
end
end
end
end
end

View File

@ -1,301 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CloudresourcemanagerV1beta1
# Google Cloud Resource Manager API
#
# The Google Cloud Resource Manager API provides methods for creating, reading,
# and updating of project metadata, including IAM policies, and will shortly
# provide the same for other high-level entities (e.g. customers and resource
# groups). Longer term, we expect the cloudresourcemanager API to encompass
# other Cloud resources as well.
#
# @example
# require 'google/apis/cloudresourcemanager_v1beta1'
#
# Cloudresourcemanager = Google::Apis::CloudresourcemanagerV1beta1 # 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/', '')
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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should 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, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects'
command = make_simple_command(:post, path, 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['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists projects that are visible to the user and satisfy the specified filter.
# This method returns projects in an unspecified order. New projects do not
# necessarily appear at the end of the list.
# @param [String] page_token
# A pagination token returned from a previous call to ListProject that indicates
# from where listing should continue. Note: pagination is not yet supported; the
# server ignores this field. 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. Note: pagination is not yet supported; the server ignores
# this field. Optional.
# @param [String] filter
# An expression for filtering the results of the request. Filter rules are case
# insensitive. The fields eligible for filtering are: name id labels. where is
# a the name of a label Examples: name:* ==> The project has a name. name:Howl ==
# > The projects name is `Howl` or 'howl'. name:HOWL ==> Equivalent to above.
# NAME:howl ==> Equivalent to above. labels.color:* ==> The project has the
# label "color". labels.color:red ==> The projects label `color` has the value `
# red`. labels.color:red label.size:big ==> The project's label `color` has the
# value `red` and its label `size` has the value `big`. Optional.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_projects(page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse
command.query['pageToken'] = page_token unless page_token.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# 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)
path = 'v1beta1/projects/{projectId}'
command = make_simple_command(:get, path, 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
# 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)
path = 'v1beta1/projects/{projectId}'
command = make_simple_command(:put, path, 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
# Marks the project identified by the specified `project_id` (for example, `my-
# project-123`) for deletion. This method will only affect the project if it has
# a lifecycle state of [ACTIVE][cloudresourcemanager.projects.v1beta2.
# LifecycleState.ACTIVE] when this method is called. Otherwise this method does
# nothing (since all other states are phases of deletion). This method changes
# the project's lifecycle state from [ACTIVE][cloudresourcemanager.projects.
# v1beta2.LifecycleState.ACTIVE] to [DELETE_REQUESTED] [cloudresourcemanager.
# projects.v1beta2.LifecycleState.DELETE_REQUESTED]. The deletion starts at an
# unspecified time, at which point the lifecycle state changes to [
# DELETE_IN_PROGRESS] [cloudresourcemanager.projects.v1beta2.LifecycleState.
# DELETE_IN_PROGRESS]. Until the deletion completes, you can check the lifecycle
# state checked by retrieving the project with [GetProject] [
# cloudresourcemanager.projects.v1beta2.Projects.GetProject], and the project
# remains visible to [ListProjects] [cloudresourcemanager.projects.v1beta2.
# Projects.ListProjects]. However, you cannot update the project. After the
# deletion completes, the project is not retrievable by the [GetProject] [
# cloudresourcemanager.projects.v1beta2.Projects.GetProject] and [ListProjects] [
# cloudresourcemanager.projects.v1beta2.Projects.ListProjects] methods. The
# caller must have modify permissions for this project.
# @param [String] project_id
# The project ID (for example, `foo-bar-123`). Required.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should 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 delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{projectId}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
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] [cloudresourcemanager.projects.v1beta2.
# LifecycleState.DELETE_REQUESTED]. After deletion starts, as indicated by a
# lifecycle state of [DELETE_IN_PROGRESS] [cloudresourcemanager.projects.v1beta2.
# LifecycleState.DELETE_IN_PROGRESS], 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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should 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, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{projectId}:undelete'
command = make_simple_command(:post, path, options)
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end

View File

@ -1,49 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/compute_v1/service.rb'
require 'google/apis/compute_v1/classes.rb'
require 'google/apis/compute_v1/representations.rb'
module Google
module Apis
# Compute Engine API
#
# API for the Google Compute Engine service.
#
# @see https://developers.google.com/compute/docs/reference/latest/
module ComputeV1
VERSION = 'V1'
REVISION = '20150305'
# 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

View File

@ -1,35 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/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/docs/v1beta1/
module ContainerV1beta1
VERSION = 'V1beta1'
REVISION = '20150326'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -1,466 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ContainerV1beta1
#
class Cluster
include Google::Apis::Core::Hashable
# The API version of the Kubernetes master and kubelets running in this cluster.
# Leave blank to pick up the latest stable release, or specify a version of the
# form "x.y.z". The Google Container Engine release notes lists the currently
# supported versions. If an incorrect version is specified, the server returns
# an error listing the currently supported versions.
# Corresponds to the JSON property `clusterApiVersion`
# @return [String]
attr_accessor :cluster_api_version
# The IP address range of the container pods in this cluster, in CIDR notation (
# e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /
# 14 block in 10.0.0.0/8 or 172.16.0.0/12.
# Corresponds to the JSON property `containerIpv4Cidr`
# @return [String]
attr_accessor :container_ipv4_cidr
# [Output only] The time the cluster was created, in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# An optional description of this cluster.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Whether logs from the cluster should be made available via the Google Cloud
# Logging service. This includes both logs from your applications running in the
# cluster as well as logs from the Kubernetes components themselves.
# Corresponds to the JSON property `enableCloudLogging`
# @return [Boolean]
attr_accessor :enable_cloud_logging
alias_method :enable_cloud_logging?, :enable_cloud_logging
# Whether metrics from the cluster should be made available via the Google Cloud
# Monitoring service.
# Corresponds to the JSON property `enableCloudMonitoring`
# @return [Boolean]
attr_accessor :enable_cloud_monitoring
alias_method :enable_cloud_monitoring?, :enable_cloud_monitoring
# [Output only] The IP address of this cluster's Kubernetes master. The endpoint
# can be accessed from the internet at https://username:password@endpoint/.
# See the masterAuth property of this resource for username and password
# information.
# Corresponds to the JSON property `endpoint`
# @return [String]
attr_accessor :endpoint
# [Output only] The resource URLs of [instance groups](/compute/docs/instance-
# groups/) associated with this cluster.
# Corresponds to the JSON property `instanceGroupUrls`
# @return [Array<String>]
attr_accessor :instance_group_urls
# The authentication information for accessing the master. Authentication is
# either done using HTTP basic authentication or using a bearer token.
# Corresponds to the JSON property `masterAuth`
# @return [Google::Apis::ContainerV1beta1::MasterAuth]
attr_accessor :master_auth
# The name of this cluster. The name must be unique within this project and zone,
# and can be up to 40 characters with the following restrictions:
# - Lowercase letters, numbers, and hyphens only.
# - Must start with a letter.
# - Must end with a number or a letter.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The name of the Google Compute Engine network to which the cluster is
# connected.
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
# The machine type and image to use for all nodes in this cluster. See the
# descriptions of the child properties of nodeConfig.
# Corresponds to the JSON property `nodeConfig`
# @return [Google::Apis::ContainerV1beta1::NodeConfig]
attr_accessor :node_config
# [Output only] The size of the address space on each node for hosting
# containers.
# Corresponds to the JSON property `nodeRoutingPrefixSize`
# @return [Fixnum]
attr_accessor :node_routing_prefix_size
# The number of nodes to create in this cluster. You must ensure that your
# Compute Engine resource quota is sufficient for this number of instances plus
# one (to include the master). You must also have available firewall and routes
# quota.
# Corresponds to the JSON property `numNodes`
# @return [Fixnum]
attr_accessor :num_nodes
# [Output only] Server-defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# [Output only] The IP address range of the Kubernetes services in this cluster,
# in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in
# the last /16 from the container CIDR.
# Corresponds to the JSON property `servicesIpv4Cidr`
# @return [String]
attr_accessor :services_ipv4_cidr
# [Output only] The current status of this cluster.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# [Output only] Additional information about the current status of this cluster,
# if available.
# Corresponds to the JSON property `statusMessage`
# @return [String]
attr_accessor :status_message
# [Output only] The name of the Google Compute Engine zone in which the cluster
# resides.
# 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)
@cluster_api_version = args[:cluster_api_version] unless args[:cluster_api_version].nil?
@container_ipv4_cidr = args[:container_ipv4_cidr] unless args[:container_ipv4_cidr].nil?
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@description = args[:description] unless args[:description].nil?
@enable_cloud_logging = args[:enable_cloud_logging] unless args[:enable_cloud_logging].nil?
@enable_cloud_monitoring = args[:enable_cloud_monitoring] unless args[:enable_cloud_monitoring].nil?
@endpoint = args[:endpoint] unless args[:endpoint].nil?
@instance_group_urls = args[:instance_group_urls] unless args[:instance_group_urls].nil?
@master_auth = args[:master_auth] unless args[:master_auth].nil?
@name = args[:name] unless args[:name].nil?
@network = args[:network] unless args[:network].nil?
@node_config = args[:node_config] unless args[:node_config].nil?
@node_routing_prefix_size = args[:node_routing_prefix_size] unless args[:node_routing_prefix_size].nil?
@num_nodes = args[:num_nodes] unless args[:num_nodes].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@services_ipv4_cidr = args[:services_ipv4_cidr] unless args[:services_ipv4_cidr].nil?
@status = args[:status] unless args[:status].nil?
@status_message = args[:status_message] unless args[:status_message].nil?
@zone = args[:zone] unless args[:zone].nil?
end
end
#
class CreateClusterRequest
include Google::Apis::Core::Hashable
# A cluster resource.
# Corresponds to the JSON property `cluster`
# @return [Google::Apis::ContainerV1beta1::Cluster]
attr_accessor :cluster
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cluster = args[:cluster] unless args[:cluster].nil?
end
end
#
class ListAggregatedClustersResponse
include Google::Apis::Core::Hashable
# A list of clusters in the project, across all zones.
# Corresponds to the JSON property `clusters`
# @return [Array<Google::Apis::ContainerV1beta1::Cluster>]
attr_accessor :clusters
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@clusters = args[:clusters] unless args[:clusters].nil?
end
end
#
class ListAggregatedOperationsResponse
include Google::Apis::Core::Hashable
# A list of operations in the project, across all zones.
# Corresponds to the JSON property `operations`
# @return [Array<Google::Apis::ContainerV1beta1::Operation>]
attr_accessor :operations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operations = args[:operations] unless args[:operations].nil?
end
end
#
class ListClustersResponse
include Google::Apis::Core::Hashable
# A list of clusters in the project in the specified zone.
# Corresponds to the JSON property `clusters`
# @return [Array<Google::Apis::ContainerV1beta1::Cluster>]
attr_accessor :clusters
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@clusters = args[:clusters] unless args[:clusters].nil?
end
end
#
class ListOperationsResponse
include Google::Apis::Core::Hashable
# A list of operations in the project in the specified zone.
# Corresponds to the JSON property `operations`
# @return [Array<Google::Apis::ContainerV1beta1::Operation>]
attr_accessor :operations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operations = args[:operations] unless args[:operations].nil?
end
end
# The authentication information for accessing the master. Authentication is
# either done using HTTP basic authentication or using a bearer token.
class MasterAuth
include Google::Apis::Core::Hashable
# The token used to authenticate API requests to the master. The token is to be
# included in an HTTP Authorization Header in all requests to the master
# endpoint. The format of the header is: "Authorization: Bearer ".
# Corresponds to the JSON property `bearerToken`
# @return [String]
attr_accessor :bearer_token
# [Output only] Base64 encoded public certificate used by clients to
# authenticate to the cluster endpoint.
# Corresponds to the JSON property `clientCertificate`
# @return [String]
attr_accessor :client_certificate
# [Output only] Base64 encoded private key used by clients to authenticate to
# the cluster endpoint.
# Corresponds to the JSON property `clientKey`
# @return [String]
attr_accessor :client_key
# [Output only] Base64 encoded public certificate that is the root of trust for
# the cluster.
# Corresponds to the JSON property `clusterCaCertificate`
# @return [String]
attr_accessor :cluster_ca_certificate
# The password to use for HTTP basic authentication when accessing the
# Kubernetes master endpoint. Because the master endpoint is open to the
# internet, you should create a strong password.
# Corresponds to the JSON property `password`
# @return [String]
attr_accessor :password
# The username to use for HTTP basic authentication when accessing the
# Kubernetes master endpoint.
# 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)
@bearer_token = args[:bearer_token] unless args[:bearer_token].nil?
@client_certificate = args[:client_certificate] unless args[:client_certificate].nil?
@client_key = args[:client_key] unless args[:client_key].nil?
@cluster_ca_certificate = args[:cluster_ca_certificate] unless args[:cluster_ca_certificate].nil?
@password = args[:password] unless args[:password].nil?
@user = args[:user] unless args[:user].nil?
end
end
#
class NodeConfig
include Google::Apis::Core::Hashable
# The name of a Google Compute Engine machine type (e.g. n1-standard-1).
# If unspecified, the default machine type is n1-standard-1.
# Corresponds to the JSON property `machineType`
# @return [String]
attr_accessor :machine_type
# The optional list of ServiceAccounts, each with their specified scopes, to be
# made available on all of the node VMs. In addition to the service accounts and
# scopes specified, the "default" account will always be created with the
# following scopes to ensure the correct functioning of the cluster:
# - https://www.googleapis.com/auth/compute,
# - https://www.googleapis.com/auth/devstorage.read_only
# Corresponds to the JSON property `serviceAccounts`
# @return [Array<Google::Apis::ContainerV1beta1::ServiceAccount>]
attr_accessor :service_accounts
# The fully-specified name of a Google Compute Engine image. For example: https:/
# /www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-
# debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version date).
# If specifying an image, you are responsible for ensuring its compatibility
# with the Debian 7 backports image. We recommend leaving this field blank to
# accept the default backports-debian-7-wheezy value.
# Corresponds to the JSON property `sourceImage`
# @return [String]
attr_accessor :source_image
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@machine_type = args[:machine_type] unless args[:machine_type].nil?
@service_accounts = args[:service_accounts] unless args[:service_accounts].nil?
@source_image = args[:source_image] unless args[:source_image].nil?
end
end
# Defines the operation resource. All fields are output only.
class Operation
include Google::Apis::Core::Hashable
# If an error has occurred, a textual description of the error.
# Corresponds to the JSON property `errorMessage`
# @return [String]
attr_accessor :error_message
# The server-assigned ID for the operation.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The operation type.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
# Server-defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# The current status of the operation.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# [Optional] The URL of the cluster resource that this operation is associated
# with.
# Corresponds to the JSON property `target`
# @return [String]
attr_accessor :target
# Server-defined URL for the target of the operation.
# Corresponds to the JSON property `targetLink`
# @return [String]
attr_accessor :target_link
# The name of the Google Compute Engine zone in which the operation is taking
# place.
# 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)
@error_message = args[:error_message] unless args[:error_message].nil?
@name = args[:name] unless args[:name].nil?
@operation_type = args[:operation_type] unless args[:operation_type].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@status = args[:status] unless args[:status].nil?
@target = args[:target] unless args[:target].nil?
@target_link = args[:target_link] unless args[:target_link].nil?
@zone = args[:zone] unless args[:zone].nil?
end
end
# A Compute Engine service account.
class ServiceAccount
include Google::Apis::Core::Hashable
# Email address of the service account.
# Corresponds to the JSON property `email`
# @return [String]
attr_accessor :email
# The list of scopes to be made available for this service account.
# Corresponds to the JSON property `scopes`
# @return [Array<String>]
attr_accessor :scopes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@email = args[:email] unless args[:email].nil?
@scopes = args[:scopes] unless args[:scopes].nil?
end
end
end
end
end

View File

@ -1,177 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ContainerV1beta1
class Cluster
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CreateClusterRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListAggregatedClustersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListAggregatedOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListClustersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class MasterAuth
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class NodeConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ServiceAccount
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Cluster
class Representation < Google::Apis::Core::JsonRepresentation
property :cluster_api_version, as: 'clusterApiVersion'
property :container_ipv4_cidr, as: 'containerIpv4Cidr'
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :enable_cloud_logging, as: 'enableCloudLogging'
property :enable_cloud_monitoring, as: 'enableCloudMonitoring'
property :endpoint, as: 'endpoint'
collection :instance_group_urls, as: 'instanceGroupUrls'
property :master_auth, as: 'masterAuth', class: Google::Apis::ContainerV1beta1::MasterAuth, decorator: Google::Apis::ContainerV1beta1::MasterAuth::Representation
property :name, as: 'name'
property :network, as: 'network'
property :node_config, as: 'nodeConfig', class: Google::Apis::ContainerV1beta1::NodeConfig, decorator: Google::Apis::ContainerV1beta1::NodeConfig::Representation
property :node_routing_prefix_size, as: 'nodeRoutingPrefixSize'
property :num_nodes, as: 'numNodes'
property :self_link, as: 'selfLink'
property :services_ipv4_cidr, as: 'servicesIpv4Cidr'
property :status, as: 'status'
property :status_message, as: 'statusMessage'
property :zone, as: 'zone'
end
end
# @private
class CreateClusterRequest
class Representation < Google::Apis::Core::JsonRepresentation
property :cluster, as: 'cluster', class: Google::Apis::ContainerV1beta1::Cluster, decorator: Google::Apis::ContainerV1beta1::Cluster::Representation
end
end
# @private
class ListAggregatedClustersResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :clusters, as: 'clusters', class: Google::Apis::ContainerV1beta1::Cluster, decorator: Google::Apis::ContainerV1beta1::Cluster::Representation
end
end
# @private
class ListAggregatedOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :operations, as: 'operations', class: Google::Apis::ContainerV1beta1::Operation, decorator: Google::Apis::ContainerV1beta1::Operation::Representation
end
end
# @private
class ListClustersResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :clusters, as: 'clusters', class: Google::Apis::ContainerV1beta1::Cluster, decorator: Google::Apis::ContainerV1beta1::Cluster::Representation
end
end
# @private
class ListOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :operations, as: 'operations', class: Google::Apis::ContainerV1beta1::Operation, decorator: Google::Apis::ContainerV1beta1::Operation::Representation
end
end
# @private
class MasterAuth
class Representation < Google::Apis::Core::JsonRepresentation
property :bearer_token, as: 'bearerToken'
property :client_certificate, as: 'clientCertificate'
property :client_key, as: 'clientKey'
property :cluster_ca_certificate, as: 'clusterCaCertificate'
property :password, as: 'password'
property :user, as: 'user'
end
end
# @private
class NodeConfig
class Representation < Google::Apis::Core::JsonRepresentation
property :machine_type, as: 'machineType'
collection :service_accounts, as: 'serviceAccounts', class: Google::Apis::ContainerV1beta1::ServiceAccount, decorator: Google::Apis::ContainerV1beta1::ServiceAccount::Representation
property :source_image, as: 'sourceImage'
end
end
# @private
class Operation
class Representation < Google::Apis::Core::JsonRepresentation
property :error_message, as: 'errorMessage'
property :name, as: 'name'
property :operation_type, as: 'operationType'
property :self_link, as: 'selfLink'
property :status, as: 'status'
property :target, as: 'target'
property :target_link, as: 'targetLink'
property :zone, as: 'zone'
end
end
# @private
class ServiceAccount
class Representation < Google::Apis::Core::JsonRepresentation
property :email, as: 'email'
collection :scopes, as: 'scopes'
end
end
end
end
end

View File

@ -1,394 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ContainerV1beta1
# 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.
#
# @example
# require 'google/apis/container_v1beta1'
#
# Container = Google::Apis::ContainerV1beta1 # Alias the module
# service = Container::ContainerService.new
#
# @see https://cloud.google.com/container-engine/docs/v1beta1/
class ContainerService < 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/', 'container/v1beta1/projects/')
end
# Lists all clusters owned by a project across all zones.
# @param [String] project_id
# The Google Developers Console project ID or project number.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::ContainerV1beta1::ListAggregatedClustersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_clusters(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{projectId}/clusters'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse::Representation
command.response_class = Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists all operations in a project, across all zones.
# @param [String] project_id
# The Google Developers Console project ID or project number.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::ContainerV1beta1::ListAggregatedOperationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{projectId}/operations'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse::Representation
command.response_class = Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Creates a cluster, consisting of the specified number and type of Google
# Compute Engine instances, plus a Kubernetes master instance.
# The cluster is created in the project's default network.
# A firewall is added that allows traffic into port 443 on the master, which
# enables HTTPS. A firewall and a route is added for each node to allow the
# containers on that node to communicate with all other instances in the cluster.
# Finally, an entry is added to the project's global metadata indicating which
# CIDR range is being used by the cluster.
# @param [String] project_id
# The Google Developers Console project ID or project number.
# @param [String] zone_id
# The name of the Google Compute Engine zone in which the cluster resides.
# @param [Google::Apis::ContainerV1beta1::CreateClusterRequest] create_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.
# 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::ContainerV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContainerV1beta1::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_cluster(project_id, zone_id, create_cluster_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{projectId}/zones/{zoneId}/clusters'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::ContainerV1beta1::CreateClusterRequest::Representation
command.request_object = create_cluster_request_object
command.response_representation = Google::Apis::ContainerV1beta1::Operation::Representation
command.response_class = Google::Apis::ContainerV1beta1::Operation
command.params['projectId'] = project_id unless project_id.nil?
command.params['zoneId'] = zone_id unless zone_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
# Deletes the cluster, including the Kubernetes master and all worker nodes.
# Firewalls and routes that were configured at cluster creation are also deleted.
# @param [String] project_id
# The Google Developers Console project ID or project number.
# @param [String] zone_id
# The name of the Google Compute Engine zone in which the cluster resides.
# @param [String] cluster_id
# The name of the cluster 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::ContainerV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContainerV1beta1::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_zone_cluster(project_id, zone_id, cluster_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{projectId}/zones/{zoneId}/clusters/{clusterId}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::ContainerV1beta1::Operation::Representation
command.response_class = Google::Apis::ContainerV1beta1::Operation
command.params['projectId'] = project_id unless project_id.nil?
command.params['zoneId'] = zone_id unless zone_id.nil?
command.params['clusterId'] = cluster_id unless cluster_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 cluster.
# @param [String] project_id
# The Google Developers Console project ID or project number.
# @param [String] zone_id
# The name of the Google Compute Engine zone in which the cluster resides.
# @param [String] cluster_id
# The name of the cluster 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::ContainerV1beta1::Cluster] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContainerV1beta1::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_zone_cluster(project_id, zone_id, cluster_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{projectId}/zones/{zoneId}/clusters/{clusterId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ContainerV1beta1::Cluster::Representation
command.response_class = Google::Apis::ContainerV1beta1::Cluster
command.params['projectId'] = project_id unless project_id.nil?
command.params['zoneId'] = zone_id unless zone_id.nil?
command.params['clusterId'] = cluster_id unless cluster_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
# Lists all clusters owned by a project in the specified zone.
# @param [String] project_id
# The Google Developers Console project ID or project number.
# @param [String] zone_id
# The name of the Google Compute Engine zone in which the cluster resides.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::ContainerV1beta1::ListClustersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContainerV1beta1::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_zone_clusters(project_id, zone_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{projectId}/zones/{zoneId}/clusters'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ContainerV1beta1::ListClustersResponse::Representation
command.response_class = Google::Apis::ContainerV1beta1::ListClustersResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['zoneId'] = zone_id unless zone_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 specified operation.
# @param [String] project_id
# The Google Developers Console project ID or project number.
# @param [String] zone_id
# The name of the Google Compute Engine zone in which the operation resides.
# This is always the same zone as the cluster with which the operation is
# associated.
# @param [String] operation_id
# The server-assigned name of the operation.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::ContainerV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContainerV1beta1::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_zone_operation(project_id, zone_id, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{projectId}/zones/{zoneId}/operations/{operationId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ContainerV1beta1::Operation::Representation
command.response_class = Google::Apis::ContainerV1beta1::Operation
command.params['projectId'] = project_id unless project_id.nil?
command.params['zoneId'] = zone_id unless zone_id.nil?
command.params['operationId'] = operation_id unless operation_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
# Lists all operations in a project in a specific zone.
# @param [String] project_id
# The Google Developers Console project ID or project number.
# @param [String] zone_id
# The name of the Google Compute Engine zone to return operations 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::ContainerV1beta1::ListOperationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContainerV1beta1::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_zone_operations(project_id, zone_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{projectId}/zones/{zoneId}/operations'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ContainerV1beta1::ListOperationsResponse::Representation
command.response_class = Google::Apis::ContainerV1beta1::ListOperationsResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['zoneId'] = zone_id unless zone_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

View File

@ -1,35 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/content_v2/service.rb'
require 'google/apis/content_v2/classes.rb'
require 'google/apis/content_v2/representations.rb'
module Google
module Apis
# Content API for Shopping
#
# Manage product items, inventory, and Merchant Center accounts for Google
# Shopping.
#
# @see https://developers.google.com/shopping-content/v2/
module ContentV2
VERSION = 'V2'
REVISION = '20150528'
# 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

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/coordinate_v1/service.rb'
require 'google/apis/coordinate_v1/classes.rb'
require 'google/apis/coordinate_v1/representations.rb'
module Google
module Apis
# Google Maps Coordinate API
#
# Lets you view and manage jobs in a Coordinate team.
#
# @see https://developers.google.com/coordinate/
module CoordinateV1
VERSION = 'V1'
REVISION = '20141215'
# View and manage your Google Maps Coordinate jobs
AUTH_COORDINATE = 'https://www.googleapis.com/auth/coordinate'
# View your Google Coordinate jobs
AUTH_COORDINATE_READONLY = 'https://www.googleapis.com/auth/coordinate.readonly'
end
end
end

View File

@ -1,669 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CoordinateV1
# Custom field.
class CustomField
include Google::Apis::Core::Hashable
# Custom field id.
# Corresponds to the JSON property `customFieldId`
# @return [String]
attr_accessor :custom_field_id
# Identifies this object as a custom field.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Custom field value.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@custom_field_id = args[:custom_field_id] unless args[:custom_field_id].nil?
@kind = args[:kind] unless args[:kind].nil?
@value = args[:value] unless args[:value].nil?
end
end
# Custom field definition.
class CustomFieldDef
include Google::Apis::Core::Hashable
# Whether the field is enabled.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
# List of enum items for this custom field. Populated only if the field type is
# enum. Enum fields appear as 'lists' in the Coordinate web and mobile UI.
# Corresponds to the JSON property `enumitems`
# @return [Array<Google::Apis::CoordinateV1::EnumItemDef>]
attr_accessor :enumitems
# Custom field id.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies this object as a custom field definition.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Custom field name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Whether the field is required for checkout.
# Corresponds to the JSON property `requiredForCheckout`
# @return [Boolean]
attr_accessor :required_for_checkout
alias_method :required_for_checkout?, :required_for_checkout
# Custom field type.
# 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)
@enabled = args[:enabled] unless args[:enabled].nil?
@enumitems = args[:enumitems] unless args[:enumitems].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@required_for_checkout = args[:required_for_checkout] unless args[:required_for_checkout].nil?
@type = args[:type] unless args[:type].nil?
end
end
# Collection of custom field definitions for a team.
class ListCustomFieldDefResponse
include Google::Apis::Core::Hashable
# Collection of custom field definitions in a team.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::CoordinateV1::CustomFieldDef>]
attr_accessor :items
# Identifies this object as a collection of custom field definitions in a team.
# 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] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# Collection of custom fields.
class CustomFields
include Google::Apis::Core::Hashable
# Collection of custom fields.
# Corresponds to the JSON property `customField`
# @return [Array<Google::Apis::CoordinateV1::CustomField>]
attr_accessor :custom_field
# Identifies this object as a collection of custom fields.
# 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)
@custom_field = args[:custom_field] unless args[:custom_field].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# Enum Item definition.
class EnumItemDef
include Google::Apis::Core::Hashable
# Whether the enum item is active. Jobs may contain inactive enum values;
# however, setting an enum to an inactive value when creating or updating a job
# will result in a 500 error.
# Corresponds to the JSON property `active`
# @return [Boolean]
attr_accessor :active
alias_method :active?, :active
# Identifies this object as an enum item definition.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Custom field value.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@active = args[:active] unless args[:active].nil?
@kind = args[:kind] unless args[:kind].nil?
@value = args[:value] unless args[:value].nil?
end
end
# A job.
class Job
include Google::Apis::Core::Hashable
# Job id.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# List of job changes since it was created. The first change corresponds to the
# state of the job when it was created.
# Corresponds to the JSON property `jobChange`
# @return [Array<Google::Apis::CoordinateV1::JobChange>]
attr_accessor :job_change
# Identifies this object as a job.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Current state of a job.
# Corresponds to the JSON property `state`
# @return [Google::Apis::CoordinateV1::JobState]
attr_accessor :state
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@job_change = args[:job_change] unless args[:job_change].nil?
@kind = args[:kind] unless args[:kind].nil?
@state = args[:state] unless args[:state].nil?
end
end
# Change to a job. For example assigning the job to a different worker.
class JobChange
include Google::Apis::Core::Hashable
# Identifies this object as a job change.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Current state of a job.
# Corresponds to the JSON property `state`
# @return [Google::Apis::CoordinateV1::JobState]
attr_accessor :state
# Time at which this change was applied.
# Corresponds to the JSON property `timestamp`
# @return [String]
attr_accessor :timestamp
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
@state = args[:state] unless args[:state].nil?
@timestamp = args[:timestamp] unless args[:timestamp].nil?
end
end
# Response from a List Jobs request.
class ListJobResponse
include Google::Apis::Core::Hashable
# Jobs in the collection.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::CoordinateV1::Job>]
attr_accessor :items
# Identifies this object as a list of jobs.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A token to provide to get 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)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# Current state of a job.
class JobState
include Google::Apis::Core::Hashable
# Email address of the assignee, or the string "DELETED_USER" if the account is
# no longer available.
# Corresponds to the JSON property `assignee`
# @return [String]
attr_accessor :assignee
# Collection of custom fields.
# Corresponds to the JSON property `customFields`
# @return [Google::Apis::CoordinateV1::CustomFields]
attr_accessor :custom_fields
# Customer name.
# Corresponds to the JSON property `customerName`
# @return [String]
attr_accessor :customer_name
# Customer phone number.
# Corresponds to the JSON property `customerPhoneNumber`
# @return [String]
attr_accessor :customer_phone_number
# Identifies this object as a job state.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Location of a job.
# Corresponds to the JSON property `location`
# @return [Google::Apis::CoordinateV1::Location]
attr_accessor :location
# Note added to the job.
# Corresponds to the JSON property `note`
# @return [Array<String>]
attr_accessor :note
# Job progress.
# Corresponds to the JSON property `progress`
# @return [String]
attr_accessor :progress
# Job title.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@assignee = args[:assignee] unless args[:assignee].nil?
@custom_fields = args[:custom_fields] unless args[:custom_fields].nil?
@customer_name = args[:customer_name] unless args[:customer_name].nil?
@customer_phone_number = args[:customer_phone_number] unless args[:customer_phone_number].nil?
@kind = args[:kind] unless args[:kind].nil?
@location = args[:location] unless args[:location].nil?
@note = args[:note] unless args[:note].nil?
@progress = args[:progress] unless args[:progress].nil?
@title = args[:title] unless args[:title].nil?
end
end
# Location of a job.
class Location
include Google::Apis::Core::Hashable
# Address.
# Corresponds to the JSON property `addressLine`
# @return [Array<String>]
attr_accessor :address_line
# Identifies this object as a location.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Latitude.
# Corresponds to the JSON property `lat`
# @return [Float]
attr_accessor :lat
# Longitude.
# Corresponds to the JSON property `lng`
# @return [Float]
attr_accessor :lng
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@address_line = args[:address_line] unless args[:address_line].nil?
@kind = args[:kind] unless args[:kind].nil?
@lat = args[:lat] unless args[:lat].nil?
@lng = args[:lng] unless args[:lng].nil?
end
end
# Response from a List Locations request.
class ListLocationResponse
include Google::Apis::Core::Hashable
# Locations in the collection.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::CoordinateV1::LocationRecord>]
attr_accessor :items
# Identifies this object as a list of locations.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A token to provide to get the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Pagination information.
# Corresponds to the JSON property `tokenPagination`
# @return [Google::Apis::CoordinateV1::TokenPagination]
attr_accessor :token_pagination
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@token_pagination = args[:token_pagination] unless args[:token_pagination].nil?
end
end
# Recorded location of a worker.
class LocationRecord
include Google::Apis::Core::Hashable
# The collection time in milliseconds since the epoch.
# Corresponds to the JSON property `collectionTime`
# @return [String]
attr_accessor :collection_time
# The location accuracy in meters. This is the radius of a 95% confidence
# interval around the location measurement.
# Corresponds to the JSON property `confidenceRadius`
# @return [Float]
attr_accessor :confidence_radius
# Identifies this object as a location.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Latitude.
# Corresponds to the JSON property `latitude`
# @return [Float]
attr_accessor :latitude
# Longitude.
# Corresponds to the JSON property `longitude`
# @return [Float]
attr_accessor :longitude
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@collection_time = args[:collection_time] unless args[:collection_time].nil?
@confidence_radius = args[:confidence_radius] unless args[:confidence_radius].nil?
@kind = args[:kind] unless args[:kind].nil?
@latitude = args[:latitude] unless args[:latitude].nil?
@longitude = args[:longitude] unless args[:longitude].nil?
end
end
# Job schedule.
class Schedule
include Google::Apis::Core::Hashable
# Whether the job is scheduled for the whole day. Time of day in start/end times
# is ignored if this is true.
# Corresponds to the JSON property `allDay`
# @return [Boolean]
attr_accessor :all_day
alias_method :all_day?, :all_day
# Job duration in milliseconds.
# Corresponds to the JSON property `duration`
# @return [String]
attr_accessor :duration
# Scheduled end time in milliseconds since epoch.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
# Identifies this object as a job schedule.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Scheduled start time in milliseconds since 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)
@all_day = args[:all_day] unless args[:all_day].nil?
@duration = args[:duration] unless args[:duration].nil?
@end_time = args[:end_time] unless args[:end_time].nil?
@kind = args[:kind] unless args[:kind].nil?
@start_time = args[:start_time] unless args[:start_time].nil?
end
end
# A Coordinate team.
class Team
include Google::Apis::Core::Hashable
# Team id, as found in a coordinate team url e.g. https://coordinate.google.com/
# f/xyz where "xyz" is the team id.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies this object as a team.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Team 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] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
end
end
# Response from a List Teams request.
class ListTeamResponse
include Google::Apis::Core::Hashable
# Teams in the collection.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::CoordinateV1::Team>]
attr_accessor :items
# Identifies this object as a list of teams.
# 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] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# Pagination information.
class TokenPagination
include Google::Apis::Core::Hashable
# Identifies this object as pagination information.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A token to provide to get the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# A token to provide to get the previous page of results.
# Corresponds to the JSON property `previousPageToken`
# @return [String]
attr_accessor :previous_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@previous_page_token = args[:previous_page_token] unless args[:previous_page_token].nil?
end
end
# A worker in a Coordinate team.
class Worker
include Google::Apis::Core::Hashable
# Worker email address. If a worker has been deleted from your team, the email
# address will appear as DELETED_USER.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies this object as a worker.
# 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)
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
# Response from a List Workers request.
class ListWorkerResponse
include Google::Apis::Core::Hashable
# Workers in the collection.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::CoordinateV1::Worker>]
attr_accessor :items
# Identifies this object as a list of workers.
# 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] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
end
end
end
end
end

View File

@ -1,285 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CoordinateV1
class CustomField
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomFieldDef
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListCustomFieldDefResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CustomFields
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class EnumItemDef
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Job
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobChange
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListJobResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class JobState
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Location
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListLocationResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class LocationRecord
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Schedule
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Team
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListTeamResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TokenPagination
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Worker
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListWorkerResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class CustomField
class Representation < Google::Apis::Core::JsonRepresentation
property :custom_field_id, as: 'customFieldId'
property :kind, as: 'kind'
property :value, as: 'value'
end
end
# @private
class CustomFieldDef
class Representation < Google::Apis::Core::JsonRepresentation
property :enabled, as: 'enabled'
collection :enumitems, as: 'enumitems', class: Google::Apis::CoordinateV1::EnumItemDef, decorator: Google::Apis::CoordinateV1::EnumItemDef::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
property :required_for_checkout, as: 'requiredForCheckout'
property :type, as: 'type'
end
end
# @private
class ListCustomFieldDefResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::CoordinateV1::CustomFieldDef, decorator: Google::Apis::CoordinateV1::CustomFieldDef::Representation
property :kind, as: 'kind'
end
end
# @private
class CustomFields
class Representation < Google::Apis::Core::JsonRepresentation
collection :custom_field, as: 'customField', class: Google::Apis::CoordinateV1::CustomField, decorator: Google::Apis::CoordinateV1::CustomField::Representation
property :kind, as: 'kind'
end
end
# @private
class EnumItemDef
class Representation < Google::Apis::Core::JsonRepresentation
property :active, as: 'active'
property :kind, as: 'kind'
property :value, as: 'value'
end
end
# @private
class Job
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :job_change, as: 'jobChange', class: Google::Apis::CoordinateV1::JobChange, decorator: Google::Apis::CoordinateV1::JobChange::Representation
property :kind, as: 'kind'
property :state, as: 'state', class: Google::Apis::CoordinateV1::JobState, decorator: Google::Apis::CoordinateV1::JobState::Representation
end
end
# @private
class JobChange
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :state, as: 'state', class: Google::Apis::CoordinateV1::JobState, decorator: Google::Apis::CoordinateV1::JobState::Representation
property :timestamp, as: 'timestamp'
end
end
# @private
class ListJobResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::CoordinateV1::Job, decorator: Google::Apis::CoordinateV1::Job::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class JobState
class Representation < Google::Apis::Core::JsonRepresentation
property :assignee, as: 'assignee'
property :custom_fields, as: 'customFields', class: Google::Apis::CoordinateV1::CustomFields, decorator: Google::Apis::CoordinateV1::CustomFields::Representation
property :customer_name, as: 'customerName'
property :customer_phone_number, as: 'customerPhoneNumber'
property :kind, as: 'kind'
property :location, as: 'location', class: Google::Apis::CoordinateV1::Location, decorator: Google::Apis::CoordinateV1::Location::Representation
collection :note, as: 'note'
property :progress, as: 'progress'
property :title, as: 'title'
end
end
# @private
class Location
class Representation < Google::Apis::Core::JsonRepresentation
collection :address_line, as: 'addressLine'
property :kind, as: 'kind'
property :lat, as: 'lat'
property :lng, as: 'lng'
end
end
# @private
class ListLocationResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::CoordinateV1::LocationRecord, decorator: Google::Apis::CoordinateV1::LocationRecord::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :token_pagination, as: 'tokenPagination', class: Google::Apis::CoordinateV1::TokenPagination, decorator: Google::Apis::CoordinateV1::TokenPagination::Representation
end
end
# @private
class LocationRecord
class Representation < Google::Apis::Core::JsonRepresentation
property :collection_time, as: 'collectionTime'
property :confidence_radius, as: 'confidenceRadius'
property :kind, as: 'kind'
property :latitude, as: 'latitude'
property :longitude, as: 'longitude'
end
end
# @private
class Schedule
class Representation < Google::Apis::Core::JsonRepresentation
property :all_day, as: 'allDay'
property :duration, as: 'duration'
property :end_time, as: 'endTime'
property :kind, as: 'kind'
property :start_time, as: 'startTime'
end
end
# @private
class Team
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
end
end
# @private
class ListTeamResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::CoordinateV1::Team, decorator: Google::Apis::CoordinateV1::Team::Representation
property :kind, as: 'kind'
end
end
# @private
class TokenPagination
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :previous_page_token, as: 'previousPageToken'
end
end
# @private
class Worker
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :kind, as: 'kind'
end
end
# @private
class ListWorkerResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::CoordinateV1::Worker, decorator: Google::Apis::CoordinateV1::Worker::Representation
property :kind, as: 'kind'
end
end
end
end
end

View File

@ -1,687 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CoordinateV1
# Google Maps Coordinate API
#
# Lets you view and manage jobs in a Coordinate team.
#
# @example
# require 'google/apis/coordinate_v1'
#
# Coordinate = Google::Apis::CoordinateV1 # Alias the module
# service = Coordinate::CoordinateService.new
#
# @see https://developers.google.com/coordinate/
class CoordinateService < 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/', 'coordinate/v1/')
end
# Retrieves a list of custom field definitions for a team.
# @param [String] team_id
# Team 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::CoordinateV1::ListCustomFieldDefResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::ListCustomFieldDefResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_field_defs(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/custom_fields'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CoordinateV1::ListCustomFieldDefResponse::Representation
command.response_class = Google::Apis::CoordinateV1::ListCustomFieldDefResponse
command.params['teamId'] = team_id unless team_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 job, including all the changes made to the job.
# @param [String] team_id
# Team ID
# @param [String] job_id
# Job number
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::Job]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_job(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/jobs/{jobId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CoordinateV1::Job::Representation
command.response_class = Google::Apis::CoordinateV1::Job
command.params['teamId'] = team_id unless team_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Inserts a new job. Only the state field of the job should be set.
# @param [String] team_id
# Team ID
# @param [Google::Apis::CoordinateV1::Job] job_object
# @param [String] address
# Job address as newline (Unix) separated string
# @param [String] assignee
# Assignee email address, or empty string to unassign.
# @param [Array<String>, String] custom_field
# Sets the value of custom fields. To set a custom field, pass the field id (
# from /team/teamId/custom_fields), a URL escaped '=' character, and the desired
# value as a parameter. For example, customField=12%3DAlice. Repeat the
# parameter for each custom field. Note that '=' cannot appear in the parameter
# value. Specifying an invalid, or inactive enum field will result in an error
# 500.
# @param [String] customer_name
# Customer name
# @param [String] customer_phone_number
# Customer phone number
# @param [Float] lat
# The latitude coordinate of this job's location.
# @param [Float] lng
# The longitude coordinate of this job's location.
# @param [String] note
# Job note as newline (Unix) separated string
# @param [String] title
# Job title
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::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 insert_job(team_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/jobs'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CoordinateV1::Job::Representation
command.request_object = job_object
command.response_representation = Google::Apis::CoordinateV1::Job::Representation
command.response_class = Google::Apis::CoordinateV1::Job
command.params['teamId'] = team_id unless team_id.nil?
command.query['address'] = address unless address.nil?
command.query['assignee'] = assignee unless assignee.nil?
command.query['customField'] = custom_field unless custom_field.nil?
command.query['customerName'] = customer_name unless customer_name.nil?
command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil?
command.query['lat'] = lat unless lat.nil?
command.query['lng'] = lng unless lng.nil?
command.query['note'] = note unless note.nil?
command.query['title'] = title unless title.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 jobs created or modified since the given timestamp.
# @param [String] team_id
# Team ID
# @param [Fixnum] max_results
# Maximum number of results to return in one page.
# @param [String] min_modified_timestamp_ms
# Minimum time a job was modified in milliseconds since epoch.
# @param [String] page_token
# Continuation 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.
# 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::CoordinateV1::ListJobResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::ListJobResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_jobs(team_id, max_results: nil, min_modified_timestamp_ms: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/jobs'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CoordinateV1::ListJobResponse::Representation
command.response_class = Google::Apis::CoordinateV1::ListJobResponse
command.params['teamId'] = team_id unless team_id.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['minModifiedTimestampMs'] = min_modified_timestamp_ms unless min_modified_timestamp_ms.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates a job. Fields that are set in the job state will be updated. This
# method supports patch semantics.
# @param [String] team_id
# Team ID
# @param [String] job_id
# Job number
# @param [Google::Apis::CoordinateV1::Job] job_object
# @param [String] address
# Job address as newline (Unix) separated string
# @param [String] assignee
# Assignee email address, or empty string to unassign.
# @param [Array<String>, String] custom_field
# Sets the value of custom fields. To set a custom field, pass the field id (
# from /team/teamId/custom_fields), a URL escaped '=' character, and the desired
# value as a parameter. For example, customField=12%3DAlice. Repeat the
# parameter for each custom field. Note that '=' cannot appear in the parameter
# value. Specifying an invalid, or inactive enum field will result in an error
# 500.
# @param [String] customer_name
# Customer name
# @param [String] customer_phone_number
# Customer phone number
# @param [Float] lat
# The latitude coordinate of this job's location.
# @param [Float] lng
# The longitude coordinate of this job's location.
# @param [String] note
# Job note as newline (Unix) separated string
# @param [String] progress
# Job progress
# @param [String] title
# Job title
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::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_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/jobs/{jobId}'
command = make_simple_command(:patch, path, options)
command.request_representation = Google::Apis::CoordinateV1::Job::Representation
command.request_object = job_object
command.response_representation = Google::Apis::CoordinateV1::Job::Representation
command.response_class = Google::Apis::CoordinateV1::Job
command.params['teamId'] = team_id unless team_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['address'] = address unless address.nil?
command.query['assignee'] = assignee unless assignee.nil?
command.query['customField'] = custom_field unless custom_field.nil?
command.query['customerName'] = customer_name unless customer_name.nil?
command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil?
command.query['lat'] = lat unless lat.nil?
command.query['lng'] = lng unless lng.nil?
command.query['note'] = note unless note.nil?
command.query['progress'] = progress unless progress.nil?
command.query['title'] = title unless title.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 job. Fields that are set in the job state will be updated.
# @param [String] team_id
# Team ID
# @param [String] job_id
# Job number
# @param [Google::Apis::CoordinateV1::Job] job_object
# @param [String] address
# Job address as newline (Unix) separated string
# @param [String] assignee
# Assignee email address, or empty string to unassign.
# @param [Array<String>, String] custom_field
# Sets the value of custom fields. To set a custom field, pass the field id (
# from /team/teamId/custom_fields), a URL escaped '=' character, and the desired
# value as a parameter. For example, customField=12%3DAlice. Repeat the
# parameter for each custom field. Note that '=' cannot appear in the parameter
# value. Specifying an invalid, or inactive enum field will result in an error
# 500.
# @param [String] customer_name
# Customer name
# @param [String] customer_phone_number
# Customer phone number
# @param [Float] lat
# The latitude coordinate of this job's location.
# @param [Float] lng
# The longitude coordinate of this job's location.
# @param [String] note
# Job note as newline (Unix) separated string
# @param [String] progress
# Job progress
# @param [String] title
# Job title
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::Job] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::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 update_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/jobs/{jobId}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::CoordinateV1::Job::Representation
command.request_object = job_object
command.response_representation = Google::Apis::CoordinateV1::Job::Representation
command.response_class = Google::Apis::CoordinateV1::Job
command.params['teamId'] = team_id unless team_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['address'] = address unless address.nil?
command.query['assignee'] = assignee unless assignee.nil?
command.query['customField'] = custom_field unless custom_field.nil?
command.query['customerName'] = customer_name unless customer_name.nil?
command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil?
command.query['lat'] = lat unless lat.nil?
command.query['lng'] = lng unless lng.nil?
command.query['note'] = note unless note.nil?
command.query['progress'] = progress unless progress.nil?
command.query['title'] = title unless title.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 locations for a worker.
# @param [String] team_id
# Team ID
# @param [String] worker_email
# Worker email address.
# @param [Fixnum] max_results
# Maximum number of results to return in one page.
# @param [String] page_token
# Continuation token
# @param [String] start_timestamp_ms
# Start timestamp in milliseconds since the epoch.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::ListLocationResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::ListLocationResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_locations(team_id, worker_email, max_results: nil, page_token: nil, start_timestamp_ms: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/workers/{workerEmail}/locations'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CoordinateV1::ListLocationResponse::Representation
command.response_class = Google::Apis::CoordinateV1::ListLocationResponse
command.params['teamId'] = team_id unless team_id.nil?
command.params['workerEmail'] = worker_email unless worker_email.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['startTimestampMs'] = start_timestamp_ms unless start_timestamp_ms.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 schedule for a job.
# @param [String] team_id
# Team ID
# @param [String] job_id
# Job number
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::Schedule] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::Schedule]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_schedule(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/jobs/{jobId}/schedule'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation
command.response_class = Google::Apis::CoordinateV1::Schedule
command.params['teamId'] = team_id unless team_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Replaces the schedule of a job with the provided schedule. This method
# supports patch semantics.
# @param [String] team_id
# Team ID
# @param [String] job_id
# Job number
# @param [Google::Apis::CoordinateV1::Schedule] schedule_object
# @param [Boolean] all_day
# Whether the job is scheduled for the whole day. Time of day in start/end times
# is ignored if this is true.
# @param [String] duration
# Job duration in milliseconds.
# @param [String] end_time
# Scheduled end time in milliseconds since epoch.
# @param [String] start_time
# Scheduled start time in milliseconds since epoch.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::Schedule] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::Schedule]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/jobs/{jobId}/schedule'
command = make_simple_command(:patch, path, options)
command.request_representation = Google::Apis::CoordinateV1::Schedule::Representation
command.request_object = schedule_object
command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation
command.response_class = Google::Apis::CoordinateV1::Schedule
command.params['teamId'] = team_id unless team_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['allDay'] = all_day unless all_day.nil?
command.query['duration'] = duration unless duration.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['startTime'] = start_time unless start_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
# Replaces the schedule of a job with the provided schedule.
# @param [String] team_id
# Team ID
# @param [String] job_id
# Job number
# @param [Google::Apis::CoordinateV1::Schedule] schedule_object
# @param [Boolean] all_day
# Whether the job is scheduled for the whole day. Time of day in start/end times
# is ignored if this is true.
# @param [String] duration
# Job duration in milliseconds.
# @param [String] end_time
# Scheduled end time in milliseconds since epoch.
# @param [String] start_time
# Scheduled start time in milliseconds since epoch.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::Schedule] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::Schedule]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/jobs/{jobId}/schedule'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::CoordinateV1::Schedule::Representation
command.request_object = schedule_object
command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation
command.response_class = Google::Apis::CoordinateV1::Schedule
command.params['teamId'] = team_id unless team_id.nil?
command.params['jobId'] = job_id unless job_id.nil?
command.query['allDay'] = all_day unless all_day.nil?
command.query['duration'] = duration unless duration.nil?
command.query['endTime'] = end_time unless end_time.nil?
command.query['startTime'] = start_time unless start_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
# Retrieves a list of teams for a user.
# @param [Boolean] admin
# Whether to include teams for which the user has the Admin role.
# @param [Boolean] dispatcher
# Whether to include teams for which the user has the Dispatcher role.
# @param [Boolean] worker
# Whether to include teams for which the user has the Worker role.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available 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::CoordinateV1::ListTeamResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::ListTeamResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_teams(admin: nil, dispatcher: nil, worker: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CoordinateV1::ListTeamResponse::Representation
command.response_class = Google::Apis::CoordinateV1::ListTeamResponse
command.query['admin'] = admin unless admin.nil?
command.query['dispatcher'] = dispatcher unless dispatcher.nil?
command.query['worker'] = worker unless worker.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 workers in a team.
# @param [String] team_id
# Team 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::CoordinateV1::ListWorkerResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CoordinateV1::ListWorkerResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_workers(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'teams/{teamId}/workers'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CoordinateV1::ListWorkerResponse::Representation
command.response_class = Google::Apis::CoordinateV1::ListWorkerResponse
command.params['teamId'] = team_id unless team_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

View File

@ -1,31 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/customsearch_v1/service.rb'
require 'google/apis/customsearch_v1/classes.rb'
require 'google/apis/customsearch_v1/representations.rb'
module Google
module Apis
# CustomSearch API
#
# Lets you search over a website or collection of websites
#
# @see https://developers.google.com/custom-search/v1/using_rest
module CustomsearchV1
VERSION = 'V1'
REVISION = '20131205'
end
end
end

View File

@ -1,771 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CustomsearchV1
#
class Context
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `facets`
# @return [Array<Array<Google::Apis::CustomsearchV1::Context::Facet>>]
attr_accessor :facets
#
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@facets = args[:facets] unless args[:facets].nil?
@title = args[:title] unless args[:title].nil?
end
#
class Facet
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `anchor`
# @return [String]
attr_accessor :anchor
#
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
#
# Corresponds to the JSON property `label_with_op`
# @return [String]
attr_accessor :label_with_op
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@anchor = args[:anchor] unless args[:anchor].nil?
@label = args[:label] unless args[:label].nil?
@label_with_op = args[:label_with_op] unless args[:label_with_op].nil?
end
end
end
#
class Promotion
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `bodyLines`
# @return [Array<Google::Apis::CustomsearchV1::Promotion::BodyLine>]
attr_accessor :body_lines
#
# Corresponds to the JSON property `displayLink`
# @return [String]
attr_accessor :display_link
#
# Corresponds to the JSON property `htmlTitle`
# @return [String]
attr_accessor :html_title
#
# Corresponds to the JSON property `image`
# @return [Google::Apis::CustomsearchV1::Promotion::Image]
attr_accessor :image
#
# Corresponds to the JSON property `link`
# @return [String]
attr_accessor :link
#
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@body_lines = args[:body_lines] unless args[:body_lines].nil?
@display_link = args[:display_link] unless args[:display_link].nil?
@html_title = args[:html_title] unless args[:html_title].nil?
@image = args[:image] unless args[:image].nil?
@link = args[:link] unless args[:link].nil?
@title = args[:title] unless args[:title].nil?
end
#
class BodyLine
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `htmlTitle`
# @return [String]
attr_accessor :html_title
#
# Corresponds to the JSON property `link`
# @return [String]
attr_accessor :link
#
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
#
# 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)
@html_title = args[:html_title] unless args[:html_title].nil?
@link = args[:link] unless args[:link].nil?
@title = args[:title] unless args[:title].nil?
@url = args[:url] unless args[:url].nil?
end
end
#
class Image
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `height`
# @return [Fixnum]
attr_accessor :height
#
# Corresponds to the JSON property `source`
# @return [String]
attr_accessor :source
#
# 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)
@height = args[:height] unless args[:height].nil?
@source = args[:source] unless args[:source].nil?
@width = args[:width] unless args[:width].nil?
end
end
end
#
class Query
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `count`
# @return [Fixnum]
attr_accessor :count
#
# Corresponds to the JSON property `cr`
# @return [String]
attr_accessor :cr
#
# Corresponds to the JSON property `cref`
# @return [String]
attr_accessor :cref
#
# Corresponds to the JSON property `cx`
# @return [String]
attr_accessor :cx
#
# Corresponds to the JSON property `dateRestrict`
# @return [String]
attr_accessor :date_restrict
#
# Corresponds to the JSON property `disableCnTwTranslation`
# @return [String]
attr_accessor :disable_cn_tw_translation
#
# Corresponds to the JSON property `exactTerms`
# @return [String]
attr_accessor :exact_terms
#
# Corresponds to the JSON property `excludeTerms`
# @return [String]
attr_accessor :exclude_terms
#
# Corresponds to the JSON property `fileType`
# @return [String]
attr_accessor :file_type
#
# Corresponds to the JSON property `filter`
# @return [String]
attr_accessor :filter
#
# Corresponds to the JSON property `gl`
# @return [String]
attr_accessor :gl
#
# Corresponds to the JSON property `googleHost`
# @return [String]
attr_accessor :google_host
#
# Corresponds to the JSON property `highRange`
# @return [String]
attr_accessor :high_range
#
# Corresponds to the JSON property `hl`
# @return [String]
attr_accessor :hl
#
# Corresponds to the JSON property `hq`
# @return [String]
attr_accessor :hq
#
# Corresponds to the JSON property `imgColorType`
# @return [String]
attr_accessor :img_color_type
#
# Corresponds to the JSON property `imgDominantColor`
# @return [String]
attr_accessor :img_dominant_color
#
# Corresponds to the JSON property `imgSize`
# @return [String]
attr_accessor :img_size
#
# Corresponds to the JSON property `imgType`
# @return [String]
attr_accessor :img_type
#
# Corresponds to the JSON property `inputEncoding`
# @return [String]
attr_accessor :input_encoding
#
# Corresponds to the JSON property `language`
# @return [String]
attr_accessor :language
#
# Corresponds to the JSON property `linkSite`
# @return [String]
attr_accessor :link_site
#
# Corresponds to the JSON property `lowRange`
# @return [String]
attr_accessor :low_range
#
# Corresponds to the JSON property `orTerms`
# @return [String]
attr_accessor :or_terms
#
# Corresponds to the JSON property `outputEncoding`
# @return [String]
attr_accessor :output_encoding
#
# Corresponds to the JSON property `relatedSite`
# @return [String]
attr_accessor :related_site
#
# Corresponds to the JSON property `rights`
# @return [String]
attr_accessor :rights
#
# Corresponds to the JSON property `safe`
# @return [String]
attr_accessor :safe
#
# Corresponds to the JSON property `searchTerms`
# @return [String]
attr_accessor :search_terms
#
# Corresponds to the JSON property `searchType`
# @return [String]
attr_accessor :search_type
#
# Corresponds to the JSON property `siteSearch`
# @return [String]
attr_accessor :site_search
#
# Corresponds to the JSON property `siteSearchFilter`
# @return [String]
attr_accessor :site_search_filter
#
# Corresponds to the JSON property `sort`
# @return [String]
attr_accessor :sort
#
# Corresponds to the JSON property `startIndex`
# @return [Fixnum]
attr_accessor :start_index
#
# Corresponds to the JSON property `startPage`
# @return [Fixnum]
attr_accessor :start_page
#
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
#
# Corresponds to the JSON property `totalResults`
# @return [String]
attr_accessor :total_results
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] unless args[:count].nil?
@cr = args[:cr] unless args[:cr].nil?
@cref = args[:cref] unless args[:cref].nil?
@cx = args[:cx] unless args[:cx].nil?
@date_restrict = args[:date_restrict] unless args[:date_restrict].nil?
@disable_cn_tw_translation = args[:disable_cn_tw_translation] unless args[:disable_cn_tw_translation].nil?
@exact_terms = args[:exact_terms] unless args[:exact_terms].nil?
@exclude_terms = args[:exclude_terms] unless args[:exclude_terms].nil?
@file_type = args[:file_type] unless args[:file_type].nil?
@filter = args[:filter] unless args[:filter].nil?
@gl = args[:gl] unless args[:gl].nil?
@google_host = args[:google_host] unless args[:google_host].nil?
@high_range = args[:high_range] unless args[:high_range].nil?
@hl = args[:hl] unless args[:hl].nil?
@hq = args[:hq] unless args[:hq].nil?
@img_color_type = args[:img_color_type] unless args[:img_color_type].nil?
@img_dominant_color = args[:img_dominant_color] unless args[:img_dominant_color].nil?
@img_size = args[:img_size] unless args[:img_size].nil?
@img_type = args[:img_type] unless args[:img_type].nil?
@input_encoding = args[:input_encoding] unless args[:input_encoding].nil?
@language = args[:language] unless args[:language].nil?
@link_site = args[:link_site] unless args[:link_site].nil?
@low_range = args[:low_range] unless args[:low_range].nil?
@or_terms = args[:or_terms] unless args[:or_terms].nil?
@output_encoding = args[:output_encoding] unless args[:output_encoding].nil?
@related_site = args[:related_site] unless args[:related_site].nil?
@rights = args[:rights] unless args[:rights].nil?
@safe = args[:safe] unless args[:safe].nil?
@search_terms = args[:search_terms] unless args[:search_terms].nil?
@search_type = args[:search_type] unless args[:search_type].nil?
@site_search = args[:site_search] unless args[:site_search].nil?
@site_search_filter = args[:site_search_filter] unless args[:site_search_filter].nil?
@sort = args[:sort] unless args[:sort].nil?
@start_index = args[:start_index] unless args[:start_index].nil?
@start_page = args[:start_page] unless args[:start_page].nil?
@title = args[:title] unless args[:title].nil?
@total_results = args[:total_results] unless args[:total_results].nil?
end
end
#
class Result
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `cacheId`
# @return [String]
attr_accessor :cache_id
#
# Corresponds to the JSON property `displayLink`
# @return [String]
attr_accessor :display_link
#
# Corresponds to the JSON property `fileFormat`
# @return [String]
attr_accessor :file_format
#
# Corresponds to the JSON property `formattedUrl`
# @return [String]
attr_accessor :formatted_url
#
# Corresponds to the JSON property `htmlFormattedUrl`
# @return [String]
attr_accessor :html_formatted_url
#
# Corresponds to the JSON property `htmlSnippet`
# @return [String]
attr_accessor :html_snippet
#
# Corresponds to the JSON property `htmlTitle`
# @return [String]
attr_accessor :html_title
#
# Corresponds to the JSON property `image`
# @return [Google::Apis::CustomsearchV1::Result::Image]
attr_accessor :image
#
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `labels`
# @return [Array<Google::Apis::CustomsearchV1::Result::Label>]
attr_accessor :labels
#
# Corresponds to the JSON property `link`
# @return [String]
attr_accessor :link
#
# Corresponds to the JSON property `mime`
# @return [String]
attr_accessor :mime
#
# Corresponds to the JSON property `pagemap`
# @return [Hash<String,Array<Hash<String,Object>>>]
attr_accessor :pagemap
#
# Corresponds to the JSON property `snippet`
# @return [String]
attr_accessor :snippet
#
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cache_id = args[:cache_id] unless args[:cache_id].nil?
@display_link = args[:display_link] unless args[:display_link].nil?
@file_format = args[:file_format] unless args[:file_format].nil?
@formatted_url = args[:formatted_url] unless args[:formatted_url].nil?
@html_formatted_url = args[:html_formatted_url] unless args[:html_formatted_url].nil?
@html_snippet = args[:html_snippet] unless args[:html_snippet].nil?
@html_title = args[:html_title] unless args[:html_title].nil?
@image = args[:image] unless args[:image].nil?
@kind = args[:kind] unless args[:kind].nil?
@labels = args[:labels] unless args[:labels].nil?
@link = args[:link] unless args[:link].nil?
@mime = args[:mime] unless args[:mime].nil?
@pagemap = args[:pagemap] unless args[:pagemap].nil?
@snippet = args[:snippet] unless args[:snippet].nil?
@title = args[:title] unless args[:title].nil?
end
#
class Image
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `byteSize`
# @return [Fixnum]
attr_accessor :byte_size
#
# Corresponds to the JSON property `contextLink`
# @return [String]
attr_accessor :context_link
#
# Corresponds to the JSON property `height`
# @return [Fixnum]
attr_accessor :height
#
# Corresponds to the JSON property `thumbnailHeight`
# @return [Fixnum]
attr_accessor :thumbnail_height
#
# Corresponds to the JSON property `thumbnailLink`
# @return [String]
attr_accessor :thumbnail_link
#
# Corresponds to the JSON property `thumbnailWidth`
# @return [Fixnum]
attr_accessor :thumbnail_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)
@byte_size = args[:byte_size] unless args[:byte_size].nil?
@context_link = args[:context_link] unless args[:context_link].nil?
@height = args[:height] unless args[:height].nil?
@thumbnail_height = args[:thumbnail_height] unless args[:thumbnail_height].nil?
@thumbnail_link = args[:thumbnail_link] unless args[:thumbnail_link].nil?
@thumbnail_width = args[:thumbnail_width] unless args[:thumbnail_width].nil?
@width = args[:width] unless args[:width].nil?
end
end
#
class Label
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
#
# Corresponds to the JSON property `label_with_op`
# @return [String]
attr_accessor :label_with_op
#
# 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)
@display_name = args[:display_name] unless args[:display_name].nil?
@label_with_op = args[:label_with_op] unless args[:label_with_op].nil?
@name = args[:name] unless args[:name].nil?
end
end
end
#
class Search
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `context`
# @return [Google::Apis::CustomsearchV1::Context]
attr_accessor :context
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::CustomsearchV1::Result>]
attr_accessor :items
#
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `promotions`
# @return [Array<Google::Apis::CustomsearchV1::Promotion>]
attr_accessor :promotions
#
# Corresponds to the JSON property `queries`
# @return [Hash<String,Array<Google::Apis::CustomsearchV1::Query>>]
attr_accessor :queries
#
# Corresponds to the JSON property `searchInformation`
# @return [Google::Apis::CustomsearchV1::Search::SearchInformation]
attr_accessor :search_information
#
# Corresponds to the JSON property `spelling`
# @return [Google::Apis::CustomsearchV1::Search::Spelling]
attr_accessor :spelling
#
# Corresponds to the JSON property `url`
# @return [Google::Apis::CustomsearchV1::Search::Url]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@context = args[:context] unless args[:context].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@promotions = args[:promotions] unless args[:promotions].nil?
@queries = args[:queries] unless args[:queries].nil?
@search_information = args[:search_information] unless args[:search_information].nil?
@spelling = args[:spelling] unless args[:spelling].nil?
@url = args[:url] unless args[:url].nil?
end
#
class SearchInformation
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `formattedSearchTime`
# @return [String]
attr_accessor :formatted_search_time
#
# Corresponds to the JSON property `formattedTotalResults`
# @return [String]
attr_accessor :formatted_total_results
#
# Corresponds to the JSON property `searchTime`
# @return [Float]
attr_accessor :search_time
#
# Corresponds to the JSON property `totalResults`
# @return [String]
attr_accessor :total_results
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@formatted_search_time = args[:formatted_search_time] unless args[:formatted_search_time].nil?
@formatted_total_results = args[:formatted_total_results] unless args[:formatted_total_results].nil?
@search_time = args[:search_time] unless args[:search_time].nil?
@total_results = args[:total_results] unless args[:total_results].nil?
end
end
#
class Spelling
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `correctedQuery`
# @return [String]
attr_accessor :corrected_query
#
# Corresponds to the JSON property `htmlCorrectedQuery`
# @return [String]
attr_accessor :html_corrected_query
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@corrected_query = args[:corrected_query] unless args[:corrected_query].nil?
@html_corrected_query = args[:html_corrected_query] unless args[:html_corrected_query].nil?
end
end
#
class Url
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `template`
# @return [String]
attr_accessor :template
#
# 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)
@template = args[:template] unless args[:template].nil?
@type = args[:type] unless args[:type].nil?
end
end
end
end
end
end

View File

@ -1,276 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CustomsearchV1
class Context
class Representation < Google::Apis::Core::JsonRepresentation; end
class Facet
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Promotion
class Representation < Google::Apis::Core::JsonRepresentation; end
class BodyLine
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Query
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Result
class Representation < Google::Apis::Core::JsonRepresentation; end
class Image
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Label
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Search
class Representation < Google::Apis::Core::JsonRepresentation; end
class SearchInformation
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Spelling
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Url
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
# @private
class Context
class Representation < Google::Apis::Core::JsonRepresentation
collection :facets, as: 'facets', :class => Array do
include Representable::JSON::Collection
items class: Google::Apis::CustomsearchV1::Context::Facet, decorator: Google::Apis::CustomsearchV1::Context::Facet::Representation
end
property :title, as: 'title'
end
# @private
class Facet
class Representation < Google::Apis::Core::JsonRepresentation
property :anchor, as: 'anchor'
property :label, as: 'label'
property :label_with_op, as: 'label_with_op'
end
end
end
# @private
class Promotion
class Representation < Google::Apis::Core::JsonRepresentation
collection :body_lines, as: 'bodyLines', class: Google::Apis::CustomsearchV1::Promotion::BodyLine, decorator: Google::Apis::CustomsearchV1::Promotion::BodyLine::Representation
property :display_link, as: 'displayLink'
property :html_title, as: 'htmlTitle'
property :image, as: 'image', class: Google::Apis::CustomsearchV1::Promotion::Image, decorator: Google::Apis::CustomsearchV1::Promotion::Image::Representation
property :link, as: 'link'
property :title, as: 'title'
end
# @private
class BodyLine
class Representation < Google::Apis::Core::JsonRepresentation
property :html_title, as: 'htmlTitle'
property :link, as: 'link'
property :title, as: 'title'
property :url, as: 'url'
end
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :height, as: 'height'
property :source, as: 'source'
property :width, as: 'width'
end
end
end
# @private
class Query
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :cr, as: 'cr'
property :cref, as: 'cref'
property :cx, as: 'cx'
property :date_restrict, as: 'dateRestrict'
property :disable_cn_tw_translation, as: 'disableCnTwTranslation'
property :exact_terms, as: 'exactTerms'
property :exclude_terms, as: 'excludeTerms'
property :file_type, as: 'fileType'
property :filter, as: 'filter'
property :gl, as: 'gl'
property :google_host, as: 'googleHost'
property :high_range, as: 'highRange'
property :hl, as: 'hl'
property :hq, as: 'hq'
property :img_color_type, as: 'imgColorType'
property :img_dominant_color, as: 'imgDominantColor'
property :img_size, as: 'imgSize'
property :img_type, as: 'imgType'
property :input_encoding, as: 'inputEncoding'
property :language, as: 'language'
property :link_site, as: 'linkSite'
property :low_range, as: 'lowRange'
property :or_terms, as: 'orTerms'
property :output_encoding, as: 'outputEncoding'
property :related_site, as: 'relatedSite'
property :rights, as: 'rights'
property :safe, as: 'safe'
property :search_terms, as: 'searchTerms'
property :search_type, as: 'searchType'
property :site_search, as: 'siteSearch'
property :site_search_filter, as: 'siteSearchFilter'
property :sort, as: 'sort'
property :start_index, as: 'startIndex'
property :start_page, as: 'startPage'
property :title, as: 'title'
property :total_results, as: 'totalResults'
end
end
# @private
class Result
class Representation < Google::Apis::Core::JsonRepresentation
property :cache_id, as: 'cacheId'
property :display_link, as: 'displayLink'
property :file_format, as: 'fileFormat'
property :formatted_url, as: 'formattedUrl'
property :html_formatted_url, as: 'htmlFormattedUrl'
property :html_snippet, as: 'htmlSnippet'
property :html_title, as: 'htmlTitle'
property :image, as: 'image', class: Google::Apis::CustomsearchV1::Result::Image, decorator: Google::Apis::CustomsearchV1::Result::Image::Representation
property :kind, as: 'kind'
collection :labels, as: 'labels', class: Google::Apis::CustomsearchV1::Result::Label, decorator: Google::Apis::CustomsearchV1::Result::Label::Representation
property :link, as: 'link'
property :mime, as: 'mime'
hash :pagemap, as: 'pagemap', :class => Array do
include Representable::JSON::Collection
items
end
property :snippet, as: 'snippet'
property :title, as: 'title'
end
# @private
class Image
class Representation < Google::Apis::Core::JsonRepresentation
property :byte_size, as: 'byteSize'
property :context_link, as: 'contextLink'
property :height, as: 'height'
property :thumbnail_height, as: 'thumbnailHeight'
property :thumbnail_link, as: 'thumbnailLink'
property :thumbnail_width, as: 'thumbnailWidth'
property :width, as: 'width'
end
end
# @private
class Label
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :label_with_op, as: 'label_with_op'
property :name, as: 'name'
end
end
end
# @private
class Search
class Representation < Google::Apis::Core::JsonRepresentation
property :context, as: 'context', class: Google::Apis::CustomsearchV1::Context, decorator: Google::Apis::CustomsearchV1::Context::Representation
collection :items, as: 'items', class: Google::Apis::CustomsearchV1::Result, decorator: Google::Apis::CustomsearchV1::Result::Representation
property :kind, as: 'kind'
collection :promotions, as: 'promotions', class: Google::Apis::CustomsearchV1::Promotion, decorator: Google::Apis::CustomsearchV1::Promotion::Representation
hash :queries, as: 'queries', :class => Array do
include Representable::JSON::Collection
items class: Google::Apis::CustomsearchV1::Query, decorator: Google::Apis::CustomsearchV1::Query::Representation
end
property :search_information, as: 'searchInformation', class: Google::Apis::CustomsearchV1::Search::SearchInformation, decorator: Google::Apis::CustomsearchV1::Search::SearchInformation::Representation
property :spelling, as: 'spelling', class: Google::Apis::CustomsearchV1::Search::Spelling, decorator: Google::Apis::CustomsearchV1::Search::Spelling::Representation
property :url, as: 'url', class: Google::Apis::CustomsearchV1::Search::Url, decorator: Google::Apis::CustomsearchV1::Search::Url::Representation
end
# @private
class SearchInformation
class Representation < Google::Apis::Core::JsonRepresentation
property :formatted_search_time, as: 'formattedSearchTime'
property :formatted_total_results, as: 'formattedTotalResults'
property :search_time, as: 'searchTime'
property :total_results, as: 'totalResults'
end
end
# @private
class Spelling
class Representation < Google::Apis::Core::JsonRepresentation
property :corrected_query, as: 'correctedQuery'
property :html_corrected_query, as: 'htmlCorrectedQuery'
end
end
# @private
class Url
class Representation < Google::Apis::Core::JsonRepresentation
property :template, as: 'template'
property :type, as: 'type'
end
end
end
end
end
end

View File

@ -1,208 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module CustomsearchV1
# CustomSearch API
#
# Lets you search over a website or collection of websites
#
# @example
# require 'google/apis/customsearch_v1'
#
# Customsearch = Google::Apis::CustomsearchV1 # Alias the module
# service = Customsearch::CustomsearchService.new
#
# @see https://developers.google.com/custom-search/v1/using_rest
class CustomsearchService < 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/', 'customsearch/')
end
# Returns metadata about the search performed, metadata about the custom search
# engine used for the search, and the search results.
# @param [String] c2coff
# Turns off the translation between zh-CN and zh-TW.
# @param [String] cr
# Country restrict(s).
# @param [String] cref
# The URL of a linked custom search engine
# @param [String] cx
# The custom search engine ID to scope this search query
# @param [String] date_restrict
# Specifies all search results are from a time period
# @param [String] exact_terms
# Identifies a phrase that all documents in the search results must contain
# @param [String] exclude_terms
# Identifies a word or phrase that should not appear in any documents in the
# search results
# @param [String] file_type
# Returns images of a specified type. Some of the allowed values are: bmp, gif,
# png, jpg, svg, pdf, ...
# @param [String] filter
# Controls turning on or off the duplicate content filter.
# @param [String] gl
# Geolocation of end user.
# @param [String] googlehost
# The local Google domain to use to perform the search.
# @param [String] high_range
# Creates a range in form as_nlo value..as_nhi value and attempts to append it
# to query
# @param [String] hl
# Sets the user interface language.
# @param [String] hq
# Appends the extra query terms to the query.
# @param [String] img_color_type
# Returns black and white, grayscale, or color images: mono, gray, and color.
# @param [String] img_dominant_color
# Returns images of a specific dominant color: yellow, green, teal, blue, purple,
# pink, white, gray, black and brown.
# @param [String] img_size
# Returns images of a specified size, where size can be one of: icon, small,
# medium, large, xlarge, xxlarge, and huge.
# @param [String] img_type
# Returns images of a type, which can be one of: clipart, face, lineart, news,
# and photo.
# @param [String] link_site
# Specifies that all search results should contain a link to a particular URL
# @param [String] low_range
# Creates a range in form as_nlo value..as_nhi value and attempts to append it
# to query
# @param [String] lr
# The language restriction for the search results
# @param [Fixnum] num
# Number of search results to return
# @param [String] or_terms
# Provides additional search terms to check for in a document, where each
# document in the search results must contain at least one of the additional
# search terms
# @param [String] q
# Query
# @param [String] related_site
# Specifies that all search results should be pages that are related to the
# specified URL
# @param [String] rights
# Filters based on licensing. Supported values include: cc_publicdomain,
# cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations
# of these.
# @param [String] safe
# Search safety level
# @param [String] search_type
# Specifies the search type: image.
# @param [String] site_search
# Specifies all search results should be pages from a given site
# @param [String] site_search_filter
# Controls whether to include or exclude results from the site named in the
# as_sitesearch parameter
# @param [String] sort
# The sort expression to apply to the results
# @param [Fixnum] start
# The index of the first result 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::CustomsearchV1::Search] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CustomsearchV1::Search]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_cses(c2coff: nil, cr: nil, cref: nil, cx: nil, date_restrict: nil, exact_terms: nil, exclude_terms: nil, file_type: nil, filter: nil, gl: nil, googlehost: nil, high_range: nil, hl: nil, hq: nil, img_color_type: nil, img_dominant_color: nil, img_size: nil, img_type: nil, link_site: nil, low_range: nil, lr: nil, num: nil, or_terms: nil, q: nil, related_site: nil, rights: nil, safe: nil, search_type: nil, site_search: nil, site_search_filter: nil, sort: nil, start: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = 'v1'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::CustomsearchV1::Search::Representation
command.response_class = Google::Apis::CustomsearchV1::Search
command.query['c2coff'] = c2coff unless c2coff.nil?
command.query['cr'] = cr unless cr.nil?
command.query['cref'] = cref unless cref.nil?
command.query['cx'] = cx unless cx.nil?
command.query['dateRestrict'] = date_restrict unless date_restrict.nil?
command.query['exactTerms'] = exact_terms unless exact_terms.nil?
command.query['excludeTerms'] = exclude_terms unless exclude_terms.nil?
command.query['fileType'] = file_type unless file_type.nil?
command.query['filter'] = filter unless filter.nil?
command.query['gl'] = gl unless gl.nil?
command.query['googlehost'] = googlehost unless googlehost.nil?
command.query['highRange'] = high_range unless high_range.nil?
command.query['hl'] = hl unless hl.nil?
command.query['hq'] = hq unless hq.nil?
command.query['imgColorType'] = img_color_type unless img_color_type.nil?
command.query['imgDominantColor'] = img_dominant_color unless img_dominant_color.nil?
command.query['imgSize'] = img_size unless img_size.nil?
command.query['imgType'] = img_type unless img_type.nil?
command.query['linkSite'] = link_site unless link_site.nil?
command.query['lowRange'] = low_range unless low_range.nil?
command.query['lr'] = lr unless lr.nil?
command.query['num'] = num unless num.nil?
command.query['orTerms'] = or_terms unless or_terms.nil?
command.query['q'] = q unless q.nil?
command.query['relatedSite'] = related_site unless related_site.nil?
command.query['rights'] = rights unless rights.nil?
command.query['safe'] = safe unless safe.nil?
command.query['searchType'] = search_type unless search_type.nil?
command.query['siteSearch'] = site_search unless site_search.nil?
command.query['siteSearchFilter'] = site_search_filter unless site_search_filter.nil?
command.query['sort'] = sort unless sort.nil?
command.query['start'] = start unless start.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

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